scrollback: do not scroll up when already at the top ref. #57
This commit is contained in:
parent
4a156b95f9
commit
51dc6ba469
2 changed files with 6 additions and 5 deletions
|
|
@ -26,6 +26,11 @@ kscrollup(const Arg* a)
|
|||
int n = a->i;
|
||||
if (n < 0)
|
||||
n = term.row + n;
|
||||
if (term.scr + n > term.histi)
|
||||
n = term.histi - term.scr;
|
||||
|
||||
if (!n)
|
||||
return;
|
||||
|
||||
if (term.scr <= HISTSIZE-n) {
|
||||
term.scr += n;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue