Mitchell Hashimoto be99d8ffe1 terminal: decaln
2023-10-09 20:33:52 -07:00

46 lines
921 B
Plaintext

import VTSequence from "@/components/VTSequence";
# Screen Alignment Test (DECALN)
<VTSequence sequence={["ESC", "#", "8"]} />
Reset margins, move cursor to the top left, and fill the screen with `E`.
Reset the top, bottom, left, and right margins and unset [origin mode](#TODO).
The cursor is moved to the top-left corner of the screen.
All stylistic SGR attributes are unset, such as bold, blink, etc.
SGR foreground and background colors are preserved.
The [protected attribute](#TODO) is not unset.
The entire screen is filled with the character `E`. The letter `E` ignores
the current SGR settings and is written with no styling.
## Validation
### DECALN V-1: Simple Usage
```bash
printf "\033#8"
```
```
|EEEEEEEE|
|EEEEEEEE|
|EEEEEEEE|
```
### DECALN V-2: Reset Margins
```bash
printf "\033[2;3r" # scroll region top/bottom
printf "\033#8"
printf "\033[T"
```
```
|c_______|
|EEEEEEEE|
|EEEEEEEE|
```