DECSET ?2026 — Synchronized update mode
Buffer screen updates until you signal end-of-frame — eliminates flicker on full repaints.
Byte forms
Every common string-literal form so you can paste-and-search either direction.
\x1b[?2026h (begin frame) \x1b[?2026l (end frame)\033[?2026h / \033[?2026l\e[?2026h / \e[?2026lESC [ ? 2 0 2 6 h / l1b 5b 3f 32 30 32 36 68 / 6cDescription
Originally an iTerm2 + contour proposal, now adopted by kitty, wezterm, foot, ghostty, Windows Terminal, mintty, alacritty (1.7+), and tmux as a pass-through. Wrap a full-screen redraw between `\x1b[?2026h` (begin synchronized update) and `\x1b[?2026l` (end) and the terminal will hold rendering until the `l` arrives, then paint the final state once — eliminating the half-painted frames that plague neovim, helix, tui-rs, ratatui, and similar apps over slow PTYs (especially over SSH). Terminals that don't recognize `?2026` simply paint as bytes arrive, so emitting the pair is safe. Apps that want to detect support should query with the DECRQM request `\x1b[?2026$p` and parse the reply. Recommended max in-frame time is ~100 ms — terminals abort the synchronized state on timeout to avoid a stuck screen.
Spec citation: Synchronized Output Mode (contour spec) / Mode 2026
Examples
printf '\033[?2026h' # begin frame\n# … emit the full repaint here …\nprintf '\033[?2026l' # end frame -> painted atomicallyimport sys\nsys.stdout.write('\x1b[?2026h'); redraw(); sys.stdout.write('\x1b[?2026l')fmt.Print("\x1b[?2026h"); redraw(); fmt.Print("\x1b[?2026l")process.stdout.write('\x1b[?2026h'); redraw(); process.stdout.write('\x1b[?2026l')printf("\x1b[?2026h"); redraw(); printf("\x1b[?2026l");Terminal support
- xterm
- no
- Linux console (fbcon)
- no
- macOS Terminal.app
- no
- iTerm2
- yes
- Windows Terminal
- yes
- cmd.exe / ConPTY
- no
- kitty
- yes
- alacritty
- yes
- WezTerm
- yes
- Ghostty
- yes
- GNOME Terminal
- partial
- Konsole
- yes
- tmux
- no
- GNU screen
- no
| xterm | Linux console (fbcon) | macOS Terminal.app | iTerm2 | Windows Terminal | cmd.exe / ConPTY | kitty | alacritty | WezTerm | Ghostty | GNOME Terminal | Konsole | tmux | GNU screen |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| no | no | no | yes | yes | no | yes | yes | yes | yes | partial | yes | no | no |
Related sequences
In the family cookbook
DEC cookbook · 6. Focus events & sync update — `?1004`, `?2026`