scroll

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

commit 1d70f1f7eb3445ad56a5b47539c567a1e75a0923
parent 6095bf7ae4cd0659c8a954b631b1554d8e4e8770
Author: Jochen Sprickerhof <git@jochen.sprickerhof.de>
Date:   Wed, 25 Mar 2020 20:53:53 +0100

scroll/jump to bottom on new input

Diffstat:
MTODO | 1-
Mscroll.c | 4++++
2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/TODO b/TODO @@ -1,5 +1,4 @@ * strlen function which is aware of unicode - * scroll/jump to bottom on new input * single char based I/O to buffer I/O * make scroll configurable by config.h in suckless style - configure option for scrollup/-down hotkeys diff --git a/scroll.c b/scroll.c @@ -364,6 +364,10 @@ main(int argc, char *argv[]) scrolldown(buf, pos); else if (write(mfd, &c, 1) == -1) die("write:"); + else { + bottom = TAILQ_FIRST(&head); + scrolldown(buf, pos); + } } if (pfd[1].revents & POLLIN) { ssize_t n = read(mfd, &c, 1);