^[control-codes live in libghostty-vt

Private modes

DECNCSM No Clearing Screen On Column Change

Keep DECCOLM from clearing the screen, on a VT510; a default xterm ignores it.

CSI ? 95 h/l
Defaults
reset
VT510
DECNCSM—Set/Reset No Clearing Screen On Column Change
xterm
Functions using CSI

CSI ? 95 h stops a change of column mode clearing the screen, and CSI ? 95 l lets it clear again. On a VT510, switching between 80 and 132 columns with DECCOLM, or in Set-Up, clears the screen as a side effect unless this mode is set. The VT510 manual adds that the mode has no effect on DECSCPP, which changes the columns per page without clearing anything anyway. DEC STD 070 does not have the mode; the VT510 manual is the only DEC document that does.

xterm has the mode only when it emulates a VT510 or later (dpmodes, do_dec_rqm). A default xterm is a VT420, so it ignores CSI ? 95 h, answers DECRQM for mode 95 with 0, and DECCOLM goes on clearing the screen. The cases follow it, as the sources page explains.

libghostty-vt does not have the mode either: it is not in the table in modes.zig, and DECCOLM always clears. The cases pass.

Support

TerminalVersionSupportNotes
VT220manual, 2nd ed., 1984Nonot in the manual
VT510manual, 1st ed., 1993YesDECNCSM
xtermpatch 412, xterm-411aNoonly when emulating a VT510 or later; a default xterm, a VT420, ignores it and DECRQM reports 0
libghostty-vt5dc28bbNonot recognized, as in xterm

Validation

DECNCSM-1: Not recognized

\e[?95$p
\e[?95h
\e[?95$p
|______|
reply \e[?95;0$y\e[?95;0$y

DECNCSM-2: DECCOLM still clears the screen

\e[?40h   # allow 80/132
\e[?95h   # do not clear, on a VT510
ABC
\e[?3h    # 132 columns
|______|
|______|
cursor 1,1
Every example on these pages runs in your browser, in libghostty-vt compiled to WebAssembly.