Change Ctrl+l behaviour

From now on, Ctrl+l scrolls up the screen and preserves the scrollback buffer.
Fixes #46.
This commit is contained in:
veltza 2022-07-01 14:59:03 +03:00
parent df36caf56b
commit a705b714b5
4 changed files with 121 additions and 65 deletions

View file

@ -26,8 +26,9 @@ 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 (term.scr + n > term.histn)
n = term.histn - term.scr;
if (!n)
return;