From c1ef3ce0d84a58b0ce35f7fe62a24ab46e11117e Mon Sep 17 00:00:00 2001 From: Bakkeby Date: Tue, 12 Sep 2023 16:02:19 +0200 Subject: [PATCH] scrollback: clear history on reset ref. #102 --- st.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/st.c b/st.c index c03943f..d68d05b 100644 --- a/st.c +++ b/st.c @@ -3077,6 +3077,13 @@ eschandle(uchar ascii) #endif // CSI_22_23_PATCH resettitle(); xloadcols(); + #if SCROLLBACK_PATCH + if (!IS_SET(MODE_ALTSCREEN)) { + term.scr = 0; + term.histi = 0; + term.histn = 0; + } + #endif // SCROLLBACK_PATCH break; case '=': /* DECPAM -- Application keypad */ xsetmode(1, MODE_APPKEYPAD);