scrollback: do not scroll up when already at the top ref. #57

This commit is contained in:
bakkeby 2022-03-06 12:30:56 +01:00
parent 4a156b95f9
commit 51dc6ba469
2 changed files with 6 additions and 5 deletions

View File

@ -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;

View File

@ -288,13 +288,9 @@
* not specific to this variant of st - the same issue is present in
* the xterm implementation. This is likely an issue of sixel height
* not being detected correctly.
* - If combined with the alpha patch sixel graphics disappear (become white)
* when transparent and rendered against a white background. This is believed
* to be related to how the sixel graphics use RGB colors instead of RGBA.
* A pull request or instructions for how to properly add alpha support for
* sixel graphics would be very welcome.
*
* Note that you need to uncomment the corresponding lines in config.mk when including this patch.
* This patch is incompatible with the W3M patch.
*
* https://gist.github.com/saitoha/70e0fdf22e3e8f63ce937c7f7da71809
*/