Skip to content

CUP with DECOM

Category: cursor · Baseline: core · Tags: DEC Private Modes, VT100 · Specification ↗

When DECOM (Origin Mode, CSI ? 6 h) is set, CUP coordinates become relative to the current scroll region set by DECSTBM. With a scroll region of rows 5-15 and DECOM enabled, CSI 1 ; 1 H moves the cursor to row 5 (the top of the scroll region) rather than the absolute top of the screen. This interaction between DECSTBM and DECOM is fundamental to how full-screen applications partition the terminal into independently scrolling regions.
How this is testedautomated
Set DECSTBM 5;15, enable DECOM, send \x1b[1;1H, verify cursor is at row 4 (0-based scroll region top). Disable DECOM and reset scroll region.

The same probe runs against headless backends (via Termless) and real terminal apps (via a daemon launched in each terminal). This lets us distinguish parser correctness from rendering correctness.

Analysis2026-04-06

Supported by 7 of 12 terminals (58%). Not supported by: Ghostty, Kitty, iTerm2, Terminal.app, vt100.js. Part of the Core TUI baseline. Notes: vt100.js: CUP with DECOM not implemented — pure TypeScript emulator.

Supported by 9 of 14 backends (64%)

Terminal Applications

TerminalVersionSupportNotes
VS Code✓ yes
Warp✓ yes
Cursor✓ yes
iTerm23.6.9✗ nogot 1;1, expected 5;1
Ghostty1.3.1✗ nogot 1;1, expected 5;1
Terminal.app✗ no

Headless Backends

Parser correctness only — a means the parser accepts the sequence.

BackendVersionSupportNotes
Alacritty0.26.0✓ yes
Kitty0.40.0✓ yes
vterm0.2.0✓ yes
WezTerm0.1.0-fork.5✓ yes
xterm.js5.5.0✓ yes
vt100.js0.2.1✗ noCUP with DECOM not implemented — pure TypeScript emulator