scroll

scrollbackbuffer program for st
git clone git://git.suckless.org/scroll
Log | Files | Refs | README

commit 4c4aa0e7eb7df99f1bcad885432141dc1cf43dc7
parent 75d5887e31271075919dc00ec76189f7e7246380
Author: Jochen Sprickerhof <git@jochen.sprickerhof.de>
Date:   Wed, 15 Apr 2020 00:01:57 +0200

Fix clear screen esc sequences detection

Diffstat:
Mscroll.c | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/scroll.c b/scroll.c @@ -239,8 +239,9 @@ skipesc(char c) strcmp(buf, "?47l" ) == 0) altscreen = false; - /* don't save clear screen esc sequences in log */ - if (strcmp(buf, "H\033[2J") == 0) + /* don't save cursor move or clear screen */ + /* esc sequences to log */ + if (c == 'H' || strcmp(buf, "2J") == 0) return true; } break;