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-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 12;18, expected 4;6 |
| Kitty | 0.46.2 | ✗ no | got 12;18, expected 4;6 |
| VS Code | 1.113.0 | ? unknown | |
| Warp | 0.2026.03.18.08.24.03 | ? unknown | |
| Cursor | 2.6.21 | ? unknown |