From 1198eed6326ba384093e34c348c843f59e841d20 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Fri, 25 Apr 2025 08:26:26 +0100 Subject: [PATCH] Currently the DCS dispatcher detects Sixel sequences based entirely on the final character of the sequence, ignoring any intermediates. This means that other DCS sequences with a q final (like DECRQSS), can be mistakenly interpreted as Sixel. Add a check to make sure there are no intermediates before dispatching potential Sixel sequences. From James Holderness in GitHub issue 4488. --- input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/input.c b/input.c index 2c7b77b8..969f21d3 100644 --- a/input.c +++ b/input.c @@ -2384,7 +2384,7 @@ input_dcs_dispatch(struct input_ctx *ictx) #ifdef ENABLE_SIXEL w = wp->window; - if (buf[0] == 'q') { + if (buf[0] == 'q' && ictx->interm_len == 0) { if (input_split(ictx) != 0) return (0); p2 = input_get(ictx, 1, 0, 0);