mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 15:56:13 +03:00
website: update reverse wrap details and test
This commit is contained in:
@ -42,9 +42,11 @@ mode.
|
|||||||
|
|
||||||
For the **reverse wrap** (non-extended) behavior, moe the cursor to the left `n`
|
For the **reverse wrap** (non-extended) behavior, moe the cursor to the left `n`
|
||||||
cells while respecting the aforementioned leftmost boundary. Upon reaching the
|
cells while respecting the aforementioned leftmost boundary. Upon reaching the
|
||||||
leftmost boundary, if `n > 0` then move the cursor to the [right margin](#TODO)
|
leftmost boundary, if `n > 0` and the previous line was wrapped, then move the
|
||||||
of the line above the cursor. If the cursor is already on the
|
cursor to the [right margin](#TODO) of the line above the cursor. If the previous
|
||||||
[top margin](#TODO), do not move the cursor up and the sequence is complete.
|
line was not wrapped, the cursor left operation is complete even if there
|
||||||
|
is a remaining value of `n`. If the cursor
|
||||||
|
is already on the [top margin](#TODO), do not move the cursor up.
|
||||||
This wrapping mode does not wrap the cursor row back to the bottom margin.
|
This wrapping mode does not wrap the cursor row back to the bottom margin.
|
||||||
|
|
||||||
## Validation
|
## Validation
|
||||||
@ -79,4 +81,23 @@ printf "B"
|
|||||||
|Bc________|
|
|Bc________|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### CUB V-3: Reverse Wrap
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cols=$(tput cols)
|
||||||
|
printf "\033[?7h" # enable wraparound
|
||||||
|
printf "\033[?45h" # enable reverse wrap
|
||||||
|
printf "\033[1;1H" # move to top-left
|
||||||
|
printf "\033[0J" # clear screen
|
||||||
|
printf "\033[${cols}G" # move to end of line
|
||||||
|
printf "AB" # write and wrap
|
||||||
|
printf "\033[D" # move back two
|
||||||
|
printf "X"
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
|_________Xc
|
||||||
|
|B_________|
|
||||||
|
```
|
||||||
|
|
||||||
### TODO: Reverse Wrap, Scroll Region Validations
|
### TODO: Reverse Wrap, Scroll Region Validations
|
||||||
|
Reference in New Issue
Block a user