Appearance
ANSI save cursor (CSI s)
CSI sANSI save cursor (
CSI s, i.e. ESC [ s) saves the current cursor position. This is the SCO/ANSI variant of cursor save and is distinct from DECSC (ESC 7): the ANSI form only saves the cursor position (row, column), while DECSC additionally saves character attributes, the active character set, and origin mode.
The sequence collides with DECSLRM (Set Left/Right Margins, also CSI Pl ; Pr s) — when DECLRMM (mode 69) is enabled, terminals interpret CSI s with parameters as DECSLRM and the parameter-less form as save cursor. Modern xterm-derived terminals all implement this disambiguation, but some legacy terminals may treat CSI s only as DECSLRM.How this is testedautomated
Position cursor at (3,5), send
Position cursor at (3,5), send
\x1b[s (CSI s), move to (10,10), send \x1b[u (CSI u) to restore, verify cursor is back at (3,5).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: Kitty, Terminal.app. Part of the Modern TUI baseline.
Supported by 8 of 14 backends (57%)
Terminal Applications
| Terminal | Version | Support | Notes |
|---|---|---|---|
| iTerm2 | 3.6.9 | ✓ yes | |
| Ghostty | 1.3.1 | ✓ yes | |
| Terminal.app | 2.15 | ✗ no | got 10;15, expected 3;5 |
| Kitty | 0.46.2 | ✗ no | got 10;15, expected 3;5 |
| VS Code | 1.113.0 | ? unknown | |
| Warp | 0.2026.03.18.08.24.03 | ? unknown | |
| Cursor | 2.6.21 | ? unknown |