Skip to content

Scroll region (DECSTBM)

Category: scrollback · Tags: DEC Private Modes, VT100 · Specification ↗

DECSTBM (Set Top and Bottom Margins) defines a scroll region — a subset of rows where scrolling operations take effect. The sequence is ESC [ top ; bottom r, where top and bottom are 1-based row numbers. ESC [ r resets to the full screen. Scroll regions are fundamental to TUI applications. A terminal multiplexer like tmux uses them to scroll one pane without affecting others. Editors use them to scroll the document area while keeping status bars fixed. When content scrolls within the region, lines outside the region remain untouched. Virtually every full-screen terminal application depends on DECSTBM. Universally supported since the VT100.

Supported by 6 of 6 backends (100%)

Support Matrix

BackendVersionSupportNotes
Alacritty0.26.0✓ yes
Ghostty1.3.1✓ yes
Kitty0.40.0✓ yes
vt1000.1.0✓ yes
WezTerm0.1.0-fork.5✓ yes
xterm.js5.5.0✓ yes

Powered by Termless
Playwright for Terminals