Add synchronized output support (DEC mode 2026)

Implement synchronized output mode (CSI ? 2026 h/l) which allows
applications to batch terminal updates and render them atomically,
preventing screen tearing during rapid output.

Features:
- BSU (CSI ? 2026 h) pauses rendering, buffering row updates
- ESU (CSI ? 2026 l) flushes buffer and renders atomically
- Configurable timeout via synchronizedOutputTimeout option (default 5s)
- Exposed via terminal.modes.synchronizedOutputMode

Closes #3375

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Chris Lloyd
2025-12-04 11:16:25 -08:00
co-authored by Claude
parent 46c510a76d
commit 7228e2e2dc
10 changed files with 602 additions and 10 deletions
+1
View File
@@ -22,6 +22,7 @@ const DEFAULT_DEC_PRIVATE_MODES: IDecPrivateModes = Object.freeze({
origin: false,
reverseWraparound: false,
sendFocus: false,
synchronizedOutput: false,
wraparound: true // defaults: xterm - true, vt100 - false
});
+1
View File
@@ -37,6 +37,7 @@ export const DEFAULT_OPTIONS: Readonly<Required<ITerminalOptions>> = {
scrollSensitivity: 1,
screenReaderMode: false,
smoothScrollDuration: 0,
synchronizedOutputTimeout: 5000,
macOptionIsMeta: false,
macOptionClickForcesSelection: false,
minimumContrastRatio: 1,
+1
View File
@@ -259,6 +259,7 @@ export interface ITerminalOptions {
scrollOnUserInput?: boolean;
scrollSensitivity?: number;
smoothScrollDuration?: number;
synchronizedOutputTimeout?: number;
tabStopWidth?: number;
theme?: ITheme;
windowsMode?: boolean;