]> Sergey Matveev's repositories - st.git/commitdiff
csi: check for private marker in 'S' case
authorTim Culverhouse <tim@timculverhouse.com>
Sun, 18 Feb 2024 12:56:49 +0000 (06:56 -0600)
committerHiltjo Posthuma <hiltjo@codemadness.org>
Sun, 18 Feb 2024 15:14:26 +0000 (16:14 +0100)
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.

st.c

diff --git a/st.c b/st.c
index d6478f55a2498f36bc1c0fa54bdff5de94e1b114..034954d0aa83de340560498116a75930bc1b3db9 100644 (file)
--- 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;