DECSCLM Scrolling Mode
Choose between jump scrolling and smooth, slow scrolling.
CSI ? 4 h
- Defaults
- reset (jump scrolling) in xterm
- DEC STD 070
- §5.4.3 Set/Reset Scrolling Mode, p. 5-32
- VT510
- DECSCLM—Scrolling Mode
Mode 4 chooses how fast the screen scrolls. Set (CSI ? 4 h), it scrolls slowly and smoothly; DEC STD 070 asks for about six lines a second, slow enough to make the text “recognizable”. Reset (CSI ? 4 l), it jumps, as fast as the terminal can.
Only the speed changes. What ends up on the screen is the same either way, so the cases here can check only that the mode is recorded, through DECRQM, and that scrolling still scrolls.
DEC STD 070 and the VT510 manual make smooth scrolling the default. xterm starts in jump scrolling: its jumpScroll resource is true by default (charproc.c), and only when it is false does xterm start with smooth scrolling set (charproc.c). Setting the mode (charproc.c) turns jump scrolling off, and DECRQM reports the mode as set or reset (do_dec_rqm). The cases follow xterm, and libghostty-vt matches it.
Validation
DECSCLM-1: Jump scrolling by default
\e[?4$p
|_____|
reply \e[?4;2$y
DECSCLM-2: Set and reset
\e[?4h
\e[?4$p
\e[?4l
\e[?4$p
|_____|
reply \e[?4;1$y\e[?4;2$y
DECSCLM-3: Smooth scrolling still scrolls
A\r\nB\r\nC
\e[?4h # smooth scrolling
\r\nD
|B____|
|C____|
|D____|