wire / terminal-csi / decstbm
DECSTBM (final 'r') sets the vertical scrolling region to rows Pt (top) through Pb (bottom): CSI Pt ; Pb r. Scrolling, IL/DL, and SU/SD then act only within this region. 'CSI r' with no parameters resets the region to the full screen. After setting, the cursor moves to the home position (top-left, or top of region under origin mode).
aka: DECSTBM · scroll region · set margins · top bottom margins · ESC [ r
CSI introducer: \x1b[ ESC [ (0x1B 0x5B)
terminator (none): ST · BEL
| id | name | bytes (ST) | meaning |
|---|---|---|---|
| set | Set scroll region | \x1b[5;20r | CSI Pt ; Pb r sets the scrolling region to rows Pt..Pb (1-based, inclusive). Subsequent scrolling, IL/DL, and SU/SD are confined to this region. The cursor moves to home afterward. |
| reset | Reset to full screen | \x1b[r | CSI r (no parameters) resets the scrolling region to the entire screen. |
per-fact attribution:
agent: curl -H 'accept: application/json' wire.phall.io/terminal-csi/decstbm
or /terminal-csi/decstbm.json