mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 15:56:13 +03:00
website: ich split multi-cell
This commit is contained in:
@ -1620,7 +1620,9 @@ pub fn insertBlanks(self: *Terminal, count: usize) void {
|
|||||||
while (i < copyable) : (i += 1) {
|
while (i < copyable) : (i += 1) {
|
||||||
const to = right_limit - 1 - i;
|
const to = right_limit - 1 - i;
|
||||||
const from = copyable_end - i;
|
const from = copyable_end - i;
|
||||||
row.getCellPtr(to).* = row.getCell(from);
|
const src = row.getCell(from);
|
||||||
|
const dst = row.getCellPtr(to);
|
||||||
|
dst.* = src;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,6 +19,11 @@ still reset.
|
|||||||
Existing cells shifted beyond the right margin are deleted. Inserted cells
|
Existing cells shifted beyond the right margin are deleted. Inserted cells
|
||||||
are blank with the background color colored according to the current SGR state.
|
are blank with the background color colored according to the current SGR state.
|
||||||
|
|
||||||
|
If a multi-cell character (such as "橋") is shifted so that the cell is split
|
||||||
|
in half, the multi-cell character can either be clipped or erased. Typical
|
||||||
|
behavior is to clip at the right edge of the screen and erase at a right
|
||||||
|
margin, but either behavior is acceptable.
|
||||||
|
|
||||||
## Validation
|
## Validation
|
||||||
|
|
||||||
### ICH V-1: No Scroll Region, Fits on Screen
|
### ICH V-1: No Scroll Region, Fits on Screen
|
||||||
@ -101,3 +106,23 @@ printf "X"
|
|||||||
```
|
```
|
||||||
|XcABC_____|
|
|XcABC_____|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### ICH V-6: Split Wide Character
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cols=$(tput cols)
|
||||||
|
printf "\033[${cols}G"
|
||||||
|
printf "\033[1D"
|
||||||
|
printf "橋"
|
||||||
|
printf "\033[2D"
|
||||||
|
printf "\033[@"
|
||||||
|
printf "X"
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
|_______Xc_|
|
||||||
|
```
|
||||||
|
|
||||||
|
In this case, it is valid for the last cell to be blank or to clip the
|
||||||
|
multi-cell character. xterm clips the character but many other terminals
|
||||||
|
erase the cell.
|
||||||
|
Reference in New Issue
Block a user