ghostty/website/app/vt/tbc/page.mdx
Mitchell Hashimoto fc08f9ab17 terminal: TBC tests
2023-10-09 10:01:23 -07:00

48 lines
905 B
Plaintext

import VTSequence from "@/components/VTSequence";
# Tab Clear (TBC)
<VTSequence sequence={["CSI", "Pn", "g"]} />
Clear one or all tab stops.
The parameter `n` must be `0` or `3`. If `n` is omitted, `n` defaults to `0`.
If the parameter `n` is `0`, the cursor column position is marked as
not a tab stop. If the column was already not a tab stop, this does nothing.
If the parameter `n` is `3`, all tab stops are cleared.
## Validation
### TBC V-1: Tab Clear Single
```bash
printf "\033[1;1H" # move to top-left
printf "\033[0J" # clear screen
printf "\033[?W" # reset tabs
printf "\t"
printf "\033[g"
printf "\033[1G"
printf "\t"
```
```
|_______________c_______|
```
### TBC V-3: Clear All Tabstops
```bash
printf "\033[1;1H" # move to top-left
printf "\033[0J" # clear screen
printf "\033[?W" # reset tabs
printf "\033[3g"
printf "\033[1G"
printf "\t"
```
```
|______________________c|
```