Skip to content

CUP at screen boundaries โ€‹

Category: cursor ยท Tags: ECMA-48 Standard, VT100 ยท Specification โ†—

CUP (Cursor Position, CSI row ; col H) with out-of-bounds parameters should clamp the cursor to the screen edges rather than wrapping or producing undefined behavior. Sending CSI 999 ; 999 H should place the cursor at the last row and last column of the visible screen. This is important for applications that use CUP with large values as a shorthand for "move to bottom-right corner" without querying screen dimensions first.
How this is tested: Send \x1b[999;999H, verify cursor is at (rows-1, cols-1) โ€” not beyond the screen boundaries.
Analysis2026-03-26

Supported by all 5 tested terminals โ€” universal adoption. Part of the Core TUI baseline.

Supported by 10 of 11 backends (91%)

Terminal Applications โ€‹

TerminalVersionSupportNotes
iTerm23.6.9โœ“ yes
Ghostty1.3.1โœ“ yes
VS Code1.112.0โœ“ yes
Warp0.2026.03.18.08.24.03โœ“ yes
Cursor2.6.21โœ“ yes
Kitty0.46.2โœ“ yes
Terminal.app2.15โœ“ yes

Headless Backends โ€‹

Parser correctness only โ€” a โœ“ means the parser accepts the sequence.

BackendVersionSupportNotes
Alacritty0.26.0โœ“ yes
vt1000.2.1โœ“ yes
vterm0.2.0โœ“ yes
WezTerm0.1.0-fork.5โœ— nonot supported

Powered by Termless
Playwright for Terminals