Appearance
Save/restore cursor (?1048)
CSI ? 1048 h/lDECSET 1048 saves the current cursor position and attributes; DECRST 1048 restores them. The sequences are
ESC [ ? 1048 h (save) and ESC [ ? 1048 l (restore). Unlike ?1049, this mode does not switch to the alternate screen — it only manipulates the cursor save/restore state.
Mode 1048 is one of the three ingredients that ?1049 combines (cursor save + ?1047 alt screen + clear). Applications that need to checkpoint the cursor without entering the alt screen can use ?1048 directly, or use the older DECSC/DECRC (ESC 7 / ESC 8) which performs the same operation.How this is testedautomated
Position cursor, send
Position cursor, send
\x1b[?1048h (save), move elsewhere, send \x1b[?1048l (restore), verify cursor returned to saved position.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 5 of 9 terminals (56%). Not supported by: Kitty, Terminal.app, vterm.js, vt100.js. Part of the Modern TUI baseline. Notes: Kitty: ?1048 save/restore cursor not exposed via Python batch bridge; vterm.js: ?1048 save/restore cursor not implemented in vterm.js; vt100.js: Alt screen variants not supported in vt100.js baseline.
Supported by 5 of 14 backends (36%)
Terminal Applications
| Terminal | Version | Support | Notes |
|---|---|---|---|
| iTerm2 | 3.6.9 | ✓ yes | |
| Ghostty | 1.3.1 | ✓ yes | |
| Terminal.app | 2.15 | ✗ no | got 15;20, expected 5;10 |
| Kitty | 0.46.2 | ✗ no | ?1048 save/restore cursor not exposed via Python batch bridge |
| VS Code | 1.113.0 | ? unknown | |
| Warp | 0.2026.03.18.08.24.03 | ? unknown | |
| Cursor | 2.6.21 | ? unknown |
Headless Backends
Parser correctness only — a ✓ means the parser accepts the sequence.
| Backend | Version | Support | Notes |
|---|---|---|---|
| WezTerm | 0.1.0-fork.5 | ✓ yes | |
| xterm.js | 5.5.0 | ✓ yes | |
| Alacritty | 0.26.0 | ~ partial | ?1048 save/restore cursor not exposed in headless mode |
| vt100.js | 0.2.1 | ✗ no | Alt screen variants not supported in vt100.js baseline |
| vterm | 0.2.0 | ✗ no | ?1048 save/restore cursor not implemented in vterm.js |