From af5dbfcd2c63a79c7c39ed14d93a69adadf513f8 Mon Sep 17 00:00:00 2001 From: Chris Lloyd Date: Tue, 9 Dec 2025 08:26:04 -0800 Subject: [PATCH] Add DECRQM support for synchronized output mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Applications can now detect synchronized output support by querying CSI ? 2026 $ p and receiving CSI ? 2026 ; $ y response. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- src/common/InputHandler.test.ts | 2 +- src/common/InputHandler.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/InputHandler.test.ts b/src/common/InputHandler.test.ts index 78ce646a..1325cf0f 100644 --- a/src/common/InputHandler.test.ts +++ b/src/common/InputHandler.test.ts @@ -2314,7 +2314,7 @@ describe('InputHandler', () => { }); it('DEC privates with set/reset semantic', async () => { // initially reset - const reset = [1, 6, 9, 12, 45, 66, 1000, 1002, 1003, 1004, 1006, 1016, 47, 1047, 1049, 2004]; + const reset = [1, 6, 9, 12, 45, 66, 1000, 1002, 1003, 1004, 1006, 1016, 47, 1047, 1049, 2004, 2026]; for (const mode of reset) { await inputHandler.parseP(`\x1b[?${mode}$p`); assert.deepEqual(reportStack.pop(), `\x1b[?${mode};2$y`); // initial reset diff --git a/src/common/InputHandler.ts b/src/common/InputHandler.ts index 1e61a7cb..ba53941a 100644 --- a/src/common/InputHandler.ts +++ b/src/common/InputHandler.ts @@ -2298,6 +2298,7 @@ export class InputHandler extends Disposable implements IInputHandler { if (p === 1048) return f(p, V.SET); // xterm always returns SET here if (p === 47 || p === 1047 || p === 1049) return f(p, b2v(active === alt)); if (p === 2004) return f(p, b2v(dm.bracketedPasteMode)); + if (p === 2026) return f(p, b2v(dm.synchronizedOutput)); return f(p, V.NOT_RECOGNIZED); }