Appearance
ANSI restore cursor (CSI u)
CSI uANSI restore cursor (
CSI u, i.e. ESC [ u) restores the cursor position previously saved with ANSI save cursor (CSI s). This is the SCO/ANSI variant of cursor restore and is distinct from DECRC (ESC 8): the ANSI form only restores cursor position, while DECRC also restores character attributes, character set, and origin mode.
Note that CSI u is also used by the Kitty keyboard protocol as a key event reporting sequence (with parameters and a different context). When sent as input from terminal to application it's a key report; when sent as output from application to terminal it's a cursor restore. Most xterm-derived terminals implement both meanings unambiguously based on direction.How this is testedautomated
Position cursor at (3,5), send
Position cursor at (3,5), send
\x1b[s to save, move to (10,10), send \x1b[u (CSI u) to restore, verify cursor returned to (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-05-17
Supported by 10 of 12 terminals (83%). Not supported by: Kitty, Terminal.app. Part of the Modern TUI baseline.
Supported by 11 of 14 backends (79%)
Terminal Applications
| Terminal | Version | Support | Notes |
|---|---|---|---|
| iTerm2 | 3.6.9 | ✓ yes | |
| Ghostty | 1.3.1 | ✓ yes | |
| VS Code | ✓ yes | ||
| Warp | ✓ yes | ||
| Cursor | ✓ yes | ||
| Kitty | 0.46.2 | ✗ no | got 12;18, expected 4;6 |
| Terminal.app | ✗ no |