DECSCLM Scrolling Mode
Choose between jump scrolling and smooth, slow scrolling.
CSI ? 4 h/l
- Defaults
- reset (jump scrolling) in xterm
- DEC STD 070
- §5.4.3 Set/Reset Scrolling Mode, p. 5-32
- VT220
- §4.6.11 Scrolling Mode (DECSCLM)
- 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.
Support
| Terminal | Version | Support | Notes |
|---|---|---|---|
| VT220 | manual, 2nd ed., 1984 | Yes | §4.6.11 Scrolling Mode (DECSCLM) |
| VT510 | manual, 1st ed., 1993 | Yes | DECSCLM |
| xterm | patch 412, xterm-411a | Yes | jump scrolling by default (jumpScroll) |
| libghostty-vt | 0f171f6 | Yes | records the mode |
| kitty | 0.49.1, run in a VM | No | fails the case that shows it working |
| foot | 1.28.0, run in a VM | No | fails the case that shows it working |
| xterm.js headless | 6.0.0, run as a library | No | fails the case that shows it working |
| alacritty_terminal | 0.26.0, run as a library | No | fails the case that shows it working |
| ConEmu | build 230724, its documentation | No | not in ConEmu’s list, ANSI escape codes |
| rxvt-unicode | 9.31, run in a VM | Yes | passes the case that shows it working |
| VTE | 0.84.1, run as a library | No | fails the case that shows it working |
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____|