Don't print child output while scrolling - scroll - scrollbackbuffer program for st
(HTM) git clone git://git.suckless.org/scroll
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 4aa27c1b145ae6aec83cecc7fc37b9842854b769
(DIR) parent 6010f1f28817ad49ed50eca2a0b3a8a90126fd95
(HTM) Author: Jochen Sprickerhof <git@jochen.sprickerhof.de>
Date: Wed, 15 Apr 2020 22:36:40 +0200
Don't print child output while scrolling
Diffstat:
M scroll.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
(DIR) diff --git a/scroll.c b/scroll.c
@@ -520,8 +520,10 @@ main(int argc, char *argv[])
input[n] = '\0';
- if (write(STDOUT_FILENO, input, n) == -1)
- die("write:");
+ /* don't print child output while scrolling */
+ if (bottom == TAILQ_FIRST(&head))
+ if (write(STDOUT_FILENO, input, n) == -1)
+ die("write:");
/* iterate over the input buffer */
for (char *c = input; n-- > 0; c++) {