^[control-codes
live in libghostty-vt

ANSI modes

ERM Erasure Mode

View as Markdown

Whether erasing touches protected areas.

CSI 6 h/l
ECMA-48
§7.2.4 ERM – Erasure Mode, p. 22

Mode 6 decides whether the erasing functions, ED, EL, ECH, EA and EF, erase the characters in protected areas as well. In ECMA-48 an area is protected with SPA and EPA, or with DAQ.

StateECMA-48 calls itMeaning
Reset, CSI 6 lPROTECTonly unprotected areas are erased
Set, CSI 6 hALLprotected areas are erased as well

DEC STD 070 does not list it, and does not need it: a DEC terminal’s protection is DECSCA, which only the selective erases, DECSED and DECSEL, honor.

Neither xterm nor libghostty-vt implements it. Both ignore CSI 6 h and CSI 6 l, and both answer DECRQM with 0, not recognized: the mode is not among the ones xterm’s do_ansi_rqm answers for.

Support

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

Validation

ERM-1: Not recognized

\e[6$p
|_____|
reply \e[6;0$y

ERM-2: Not recognized after it is set, either

\e[6h
\e[6$p
|_____|
reply \e[6;0$y
Every example on these pages runs in your browser, in libghostty-vt compiled to WebAssembly.