scroll

scrollbackbuffer program for st
git clone git://git.suckless.org//gitrepos
Log | Files | Refs

commit 34ac4273c07f54ed3dbc9c9ba5aae833a4c52f1c
parent faf0800f0b133607a8e3b5b807ab185c1b1c242b
Author: Jochen Sprickerhof <git@jochen.sprickerhof.de>
Date:   Tue, 31 Mar 2020 19:51:36 +0200

Don't reprint scroll down if we are at the bottom

Diffstat:
Mscroll.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scroll.c b/scroll.c @@ -280,7 +280,7 @@ scrolldown(char *buf, size_t size) bottom = TAILQ_PREV(bottom, tailhead, entries); write(STDOUT_FILENO, bottom->buf, bottom->size); } - if (bottom == TAILQ_FIRST(&head)) { + if (rows < ws.ws_row && bottom == TAILQ_FIRST(&head)) { write(STDOUT_FILENO, "\033[?25h", 6); write(STDOUT_FILENO, buf, size); }