commit 4aa27c1b145ae6aec83cecc7fc37b9842854b769
parent 6010f1f28817ad49ed50eca2a0b3a8a90126fd95
Author: Jochen Sprickerhof <git@jochen.sprickerhof.de>
Date: Wed, 15 Apr 2020 22:36:40 +0200
Don't print child output while scrolling
Diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
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++) {