^[control-codes live in libghostty-vt

ANSI modes

GATM Guarded Area Transfer Mode

Whether guarded areas are left out when the screen is sent to the host.

CSI 1 h
ECMA-48
§7.2.7 GATM – Guarded Area Transfer Mode, p. 23

Mode 1 decides whether the contents of guarded areas are sent when the terminal transmits the screen to the host. A guarded area is one marked off with SPA and EPA. Terminals that do not transmit their screen have no use for it.

StateECMA-48 calls itMeaning
Reset, CSI 1 lGUARDonly the unguarded areas are sent
Set, CSI 1 hALLthe guarded areas are sent as well

DEC STD 070 does not list it, but the VT510 manual’s table of ANSI modes for DECRPM gives it as permanently reset, and DEC STD 070 says DECRQM reports every X3.64 mode as set or reset.

xterm ignores CSI 1 h and CSI 1 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.

Validation

GATM-1: Reported as permanently reset

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

GATM-2: Even after it is set

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