Severity: HIGH Status: Fixed
The DCS intermediate parser flips dcs_is_sixel on the final byte q regardless of the intermediate bytes. Both sixel (ESC P q) and DECRQSS (ESC P $ q) end in q, but only sixel should set the sixel flag.
// src/input.zig:459-476
fn advanceDcsIntermediate(self: *InputParser, byte: u8) Error!void {
switch (byte) {
0x20...0x2F => {},
'q' => {
self.dcs_is_sixel = true; // ANY DCS ending in 'q' → sixel
self.dcs_buf.clearRetainingCapacity();
try self.dcs_buf.appendSlice(self.screen.allocator, "\x1bPq");
self.state = .dcs_sixel;
},
ESC P $ q is DECRQSS (Device Status / string query). Terminals and tools emit it regularly to query colors, cursor styles, etc.dispatchDcsSixel(), polluting the sixel image table and potentially emitting garbage graphics instead of answering the query.tmux/sixel spec: a DCS sixel starts with ESC P + optional params + q; DECRQSS starts with ESC P $ q. The $ (0x24) intermediate delimiter must be present before treating the sequence as sixel.
Track the presence of the $ intermediate in the DCS body and only set dcs_is_sixel when the final byte is q and no $ delimiter preceded it (i.e. route ESC P $ q to DECRQSS handling instead).