^[control-codes
live in libghostty-vt

ANSI modes

PUM Positioning Unit Mode

View as Markdown

Whether cursor movement counts in characters or in SSU units.

CSI 11 h/l
ECMA-48
§F.4.1 PUM – Positioning Unit Mode, p. 87
DEC STD 070
§5.10.1.3 Modes That Cannot Be Changed, p. 5-134

Mode 11 decides the unit of the numbers given to the cursor movements, CUF, HPA, HVP and the others. ECMA-48 deprecates it, and moved it to an annex: SSU, Select Size Unit, sets the unit anyway, and its default is the character.

StateECMA-48 calls itMeaning
Reset, CSI 11 lCHARACTERone is one character position
Set, CSI 11 hSIZEone is the unit SSU selects

DEC STD 070 §5.10.1.3, p. 5-134 lists it among the X3.64 modes a DEC terminal may treat as fixed, as reset. The VT510 manual’s table of modes for DECRPM marks it as always reset.

xterm ignores CSI 11 h and CSI 11 l (ansi_modes handles only modes 2, 4, 12 and 20), and DECRQM reports the mode as permanently reset, 4 (do_ansi_rqm). libghostty-vt ignores it too, but does not recognize the number, so it answers DECRQM with 0. Both DECRQM cases are known differences.

Support

TerminalVersionSupportNotes
VT220manual, 2nd ed., 1984Nonot in the manual, whose table of ANSI modes has only KAM, IRM, SRM and LNM
VT510manual, 1st ed., 1993Nolisted as permanently reset
xtermpatch 412, xterm-411aNoignored; DECRQM reports it permanently reset, 4
libghostty-vt0f171f6Noignored; DECRQM answers 0 (PUM-1, PUM-2)
ConEmubuild 230724, its documentationNonot in its ANSI escape codes

Validation

PUM-1: Reported as permanently reset

\e[11$p
|_____|
reply \e[11;4$y

PUM-2: Even after it is set

\e[11h
\e[11$p
|_____|
reply \e[11;4$y

PUM-3: Movement still counts characters

\e[11h     # ignored
\e[3C
A
|___A_|
cursor 1,5
Every example on these pages runs in your browser, in libghostty-vt compiled to WebAssembly.