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-05-17
Supported by 8 of 12 terminals (67%). Not supported by: Kitty, Terminal.app, Warp, vt100.js. Part of the Modern TUI baseline. Notes: Kitty: ?1048 save/restore cursor not exposed via Python batch bridge; vt100.js: Alt screen variants not supported in vt100.js baseline.
Supported by 8 of 14 backends (57%)
Terminal Applications
| Terminal | Version | Support | Notes |
|---|---|---|---|
| iTerm2 | 3.6.9 | ✓ yes | |
| Ghostty | 1.3.1 | ✓ yes | |
| VS Code | ✓ yes | ||
| Cursor | ✓ yes | ||
| Warp | ✗ no | ||
| Kitty | 0.46.2 | ✗ no | ?1048 save/restore cursor not exposed via Python batch bridge |
| Terminal.app | ✗ no |
Headless Backends
Parser correctness only — a ✓ means the parser accepts the sequence.
| Backend | Version | Support | Notes |
|---|---|---|---|
| vterm.js | 0.2.0 | ✓ yes | ?1048 save/restore cursor not implemented in vterm.js |
| 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 |