commit 51dc6ba469cf4e05496665c6a957cf4d5a5f9bf9 parent 4a156b95f97cc1791983b10b0f1e56d77670e125 Author: bakkeby <bakkeby@gmail.com> Date: Sun, 6 Mar 2022 12:30:56 +0100 scrollback: do not scroll up when already at the top ref. #57 Diffstat:
| M | patch/scrollback.c | | | 5 | +++++ |
| M | patches.def.h | | | 6 | +----- |
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/patch/scrollback.c b/patch/scrollback.c @@ -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; diff --git a/patches.def.h b/patches.def.h @@ -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 */