Skip to content

Report text area size in chars (CSI 18 t)

Category: device · Baseline: modern · Tags: Xterm Extensions · Specification ↗

ESC [ 18 t
XTWINOPS subcode 18 queries the dimensions of the terminal text area in character cells. The query is CSI 18 t; the response is CSI 8 ; rows ; cols t. This is functionally equivalent to TIOCGWINSZ and the COLUMNS/LINES environment variables, but works in-band over the TTY without requiring ioctl access — useful for SSH sessions, multiplexers, and any context where the local environment may not match the visible terminal. This is one of the most widely supported XTWINOPS subcodes because it answers a fundamental question (how big is the terminal?) without exposing pixel dimensions or window manipulation. Many shell scripts and TUI frameworks use it as a fallback when ioctl is unavailable.
How this is testedautomated
Send \x1b[18t, verify response matches CSI 8 ; rows ; cols t.

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 9 terminals (78%). Not supported by: vterm.js, vt100.js. Part of the Modern TUI baseline. Notes: vterm.js: XTWINOPS text area size report not implemented in vterm.js; vt100.js: XTWINOPS not implemented — post-dates VT220 baseline.

Supported by 6 of 14 backends (43%)

Terminal Applications

TerminalVersionSupportNotes
iTerm23.6.9✓ yes25 rows x 80 cols
Ghostty1.3.1✓ yes119 rows x 270 cols
Terminal.app2.15✓ yes24 rows x 80 cols
Kitty0.46.2✓ yesWindow operations not exposed via Python batch bridge
VS Code1.113.0? unknown
Warp0.2026.03.18.08.24.03? unknown
Cursor2.6.21? unknown

Headless Backends

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

BackendVersionSupportNotes
Alacritty0.26.0~ partialText area size report not exposed in headless mode
WezTerm0.1.0-fork.5~ partialText area size report not exposed in headless mode
xterm.js5.5.0~ partialText area size report not exposed in xterm.js headless mode
vt100.js0.2.1✗ noXTWINOPS not implemented — post-dates VT220 baseline
vterm0.2.0✗ noXTWINOPS text area size report not implemented in vterm.js