commit e1b7a5e2d472d56c236262b1679c5017e934a025
Author:     Ian Remmler <[email protected]>
AuthorDate: Sat Apr 25 17:13:52 2020 -0500
Commit:     Jochen Sprickerhof <[email protected]>
CommitDate: Sun Apr 26 22:31:39 2020 +0200

    Don't retain any clear screen sequence variants.
    
    (Simpler, replaces previous patch)
    
    Elide all clear screen escape sequences from the scrollback buffer,
    partial or complete. zshell, for example, emits ^[[J on startup, which
    causes the scrolled down portion of the screen to be cleared when
    scrolling to the beginning of the buffer and less than the entire screen
    is scrolled.

diff --git a/scroll.c b/scroll.c
index 652eba9..b42bd48 100644
--- a/scroll.c
+++ b/scroll.c
@@ -208,7 +208,7 @@ skipesc(char c)
 
                        /* don't save cursor move or clear screen */
                        /* esc sequences to log */
-                       if (c == 'H' || strcmp(buf, "2J") == 0)
+                       if (c == 'H' || c == 'J')
                                return true;
                }
                break;

Reply via email to