website: ich split multi-cell

This commit is contained in:
Mitchell Hashimoto
2023-10-06 22:23:08 -07:00
parent f73a4f7393
commit 78d69c6cdb
2 changed files with 28 additions and 1 deletions

View File

@ -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;
} }
} }

View File

@ -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.