# Transfer Termination Mode (TTM)

> Whether a transmission stops at the cursor.

- **Sequence:** `CSI 16 h`
- **ECMA-48:** [§7.2.18 TTM – Transfer Termination Mode, p. 25](https://archive.org/details/ecma-48-5th-edition-june-1991/page/n38/mode/1up)

Mode 16 decides whether a transmission of the screen stops at the cursor,
or takes in what follows it as well.

| State | ECMA-48 calls it | Meaning |
| --- | --- | --- |
| Reset, `CSI 16 l` | CURSOR | only what precedes the cursor is sent |
| Set, `CSI 16 h` | ALL | what precedes, follows and is at the cursor is sent |

DEC STD 070 does not list it, but the VT510 manual's table of ANSI modes for
DECRPM gives it as permanently reset.

xterm ignores `CSI 16 h` and `CSI 16 l` ([`ansi_modes`](https://github.com/ThomasDickey/xterm-snapshots/blob/xterm-411a/charproc.c#L7399-L7424) handles only modes 2,
4, 12 and 20), and [DECRQM](https://control-codes.page/csi/decrqm/index.html.md) reports the mode as permanently
reset, `4` ([`do_ansi_rqm`](https://github.com/ThomasDickey/xterm-snapshots/blob/xterm-411a/misc.c#L5408-L5463)). libghostty-vt ignores it too, but does not recognize the
number, so it answers DECRQM with `0`. Both DECRQM cases are known
differences.

## Validation

### TTM-1: Reported as permanently reset

*A known difference: libghostty-vt does not pass this case.*

Input, one step per line:

```text
\e[16$p
```

Expected screen:

```text
|_____|
reply \e[16;4$y
```

### TTM-2: Even after it is set

*A known difference: libghostty-vt does not pass this case.*

Input, one step per line:

```text
\e[16h
\e[16$p
```

Expected screen:

```text
|_____|
reply \e[16;4$y
```

---

This is the Markdown version of <https://control-codes.page/ansi/ttm/>. On that page every validation case runs live in libghostty-vt, the terminal emulation core of Ghostty, compiled to WebAssembly.

The validation cases are written in the notation described in <https://control-codes.page/notation/index.html.md>.
