commit ab4da6cf310185378d7c81a0be5c1849760d93c7
parent eec2eca605ddcf8f3774e702d405736d798a8d32
Author: Jan Klemkow <j.klemkow@wemelug.de>
Date: Sat, 4 Apr 2020 21:29:46 +0200
don't save clear screen esc sequences in backlogbuffer
Diffstat:
1 file changed, 7 insertions(+), 0 deletions(-)
diff --git a/scroll.c b/scroll.c
@@ -410,6 +410,13 @@ main(int argc, char *argv[])
if (n == -1 && errno != EINTR)
die("read:");
+ /* don't save clear screen esc sequences in log */
+ if (strncmp("\033[H\033[2J", input, n) == 0) {
+ if (write(STDOUT_FILENO, input, n) == -1)
+ die("write:");
+ continue;
+ }
+
/* iterate over the input buffer */
for (char *c = input; n-- > 0; c++) {
/* don't save lines from alternative screen */