mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-05-13 16:37:27 +00:00
Fix off-by-one in code to nuke incomplete multicell chars in line
Fixes #8758
This commit is contained in:
parent
8107ffcb53
commit
75f10d140f
3 changed files with 9 additions and 1 deletions
|
|
@ -130,6 +130,8 @@ Detailed list of changes
|
|||
|
||||
- Fix a regression in 0.40.0 that broke serialization of tab characters as ANSI text (:iss:`8741`)
|
||||
|
||||
- Fix a regression in 0.40.0 that broke erasing of characters in a line in the presence of wide characters (:iss:`8758`)
|
||||
|
||||
- kitten run-shell: Fix SIGINT blocked when execing the shell (:iss:`8754`)
|
||||
|
||||
0.42.1 [2025-05-17]
|
||||
|
|
|
|||
|
|
@ -440,7 +440,7 @@ nuke_incomplete_single_line_multicell_chars_in_range(
|
|||
if (cpu_cells[x].is_multicell) {
|
||||
index_type mcd_x_limit = x + cpu_cells[x].width - cpu_cells[x].x;
|
||||
if (cpu_cells[x].x || mcd_x_limit > limit) nuke_in_line(cpu_cells, gpu_cells, x, MIN(mcd_x_limit, limit), replace_with_spaces ? ' ': 0);
|
||||
x = mcd_x_limit;
|
||||
x = mcd_x_limit - 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -308,6 +308,12 @@ def test_multicell(self: TestMulticell) -> None:
|
|||
|
||||
# Test delete chars with multicell (aka left shift)
|
||||
s.reset()
|
||||
s.draw(' 允许')
|
||||
s.cursor.x = 0
|
||||
s.delete_characters(1)
|
||||
for x in range(4):
|
||||
ac(x, 0, width=2)
|
||||
s.reset()
|
||||
multicell(s, 'a', width=2)
|
||||
s.cursor.x = 0
|
||||
s.delete_characters(1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue