aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Culverhouse <tim@timculverhouse.com>2024-02-18 13:56:49 +0100
committerHiltjo Posthuma <hiltjo@codemadness.org>2024-02-18 16:14:26 +0100
commita3f7420310be0fd778ef9fe2abf20edc2d8dc81a (patch)
tree4d2cda40f462571746075983f6992ee7b697960e
parent9846a56bd7fdc86bf788db04bbbcbde7b7eb9952 (diff)
downloadst-a3f7420310be0fd778ef9fe2abf20edc2d8dc81a.tar.zst
csi: check for private marker in 'S' case
The handler for 'S' final character does not check for a private marker. This can cause a conflict with a sequence called 'XTSMGRAPHICS' which also has an 'S' final character, but uses the private marker '?'. Without checking for a private marker, st will perform a scroll up operation when XTSMGRAPHICS is seen, which can cause unexpected display artifacts.
-rw-r--r--st.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/st.c b/st.c
index d6478f5..034954d 100644
--- a/st.c
+++ b/st.c
@@ -1728,6 +1728,7 @@ csihandle(void)
}
break;
case 'S': /* SU -- Scroll <n> line up */
+ if (csiescseq.priv) break;
DEFAULT(csiescseq.arg[0], 1);
tscrollup(term.top, csiescseq.arg[0]);
break;