commit ab4da6cf310185378d7c81a0be5c1849760d93c7
Author: Jan Klemkow <[email protected]>
AuthorDate: Sat Apr 4 21:29:46 2020 +0200
Commit: Jan Klemkow <[email protected]>
CommitDate: Sat Apr 4 21:29:46 2020 +0200
don't save clear screen esc sequences in backlogbuffer
diff --git a/scroll.c b/scroll.c
index 4c77654..806bb39 100644
--- 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 */