From a093db04b4650e3286f0eff01a4dda04d7c1ff5a Mon Sep 17 00:00:00 2001 From: Malfurious Date: Fri, 26 Jun 2020 19:55:41 -0400 Subject: patch: scrollback-mouse-altscreen Apply the following patch on top of the previous two to allow scrollback using mouse wheel only when not in MODE_ALTSCREEN. For example the content is being scrolled instead of the scrollback buffer in less. Consequently the Shift modifier for scrolling is not needed anymore. The mouse and altscreen patches 20191024-a2c479c (and later, including this one) are simpler and more robust because st gained better support for customized mouse shortcuts. As a result, the altscreen patch doesn't really need the mouse patch. However to keep it simple the instructions stay the same: the alrscreen patch still applies on top of the (now very minimal) mouse patch. --- st.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'st.c') diff --git a/st.c b/st.c index aaea6b4..0ebd3fb 100644 --- a/st.c +++ b/st.c @@ -1055,6 +1055,11 @@ tnew(int col, int row) treset(); } +int tisaltscr(void) +{ + return IS_SET(MODE_ALTSCREEN); +} + void tswapscreen(void) { -- cgit v1.2.3