mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-05-13 16:37:27 +00:00
Fix #8794
This commit is contained in:
parent
c681a999d5
commit
d7c4d42f41
3 changed files with 14 additions and 2 deletions
|
|
@ -126,7 +126,7 @@ Detailed list of changes
|
|||
- Wayland GNOME: Fix incorrect OS Window tracking because GNOME has started
|
||||
activating windows on non-current workspaces (:iss:`8716`)
|
||||
|
||||
- Fix a regression in 0.40.0 that broke rendering of VS15 variation selectors in some circumstances (:iss:`8731`)
|
||||
- Fix a regression in 0.40.0 that broke rendering of VS15 variation selectors in some circumstances (:iss:`8731`, :iss:`8794`)
|
||||
|
||||
- Fix a regression in 0.40.0 that broke serialization of tab characters as ANSI text (:iss:`8741`)
|
||||
|
||||
|
|
|
|||
|
|
@ -866,7 +866,7 @@ halve_multicell_width(Screen *self, index_type x_, index_type y_) {
|
|||
int y_max_limit = MIN(self->lines, y_ + cp[x_].scale);
|
||||
for (int y = y_min_limit + 1; y < y_max_limit; y++) {
|
||||
Line *line = range_line_(self, y); cp = line->cpu_cells; gp = line->gpu_cells;
|
||||
for (index_type x = 0; x < half_x_limit; x++) cp[x].width = new_width;
|
||||
for (index_type x = x_; x < half_x_limit; x++) cp[x].width = new_width;
|
||||
for (index_type x = half_x_limit; x < x_limit; x++) {
|
||||
cp[x] = (CPUCell){0}; clear_sprite_position(gp[x]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -710,12 +710,24 @@ class TestScreen(BaseTest):
|
|||
self.ae(s.text_for_selection(), ('a\u00adb',))
|
||||
|
||||
def test_variation_selectors(self):
|
||||
s = self.create_screen(cols=8)
|
||||
def widths(text, *widths):
|
||||
s.reset()
|
||||
s.draw(text)
|
||||
def w(x):
|
||||
c = s.cpu_cells(0, x)
|
||||
return (c['mcd'] or {'width': 1})['width']
|
||||
actual = tuple(w(x) for x in range(len(widths)))
|
||||
self.ae(widths, actual)
|
||||
widths('\u4e00\u4e00\u26ab\ufe0e', 2, 2, 2, 2, 1)
|
||||
|
||||
s = self.create_screen()
|
||||
def tt(text_to_draw):
|
||||
s.reset()
|
||||
s.draw(text_to_draw)
|
||||
self.ae(str(s.line(0)), text_to_draw)
|
||||
tt('abc\U0001f44d\ufe0ed')
|
||||
|
||||
def t(*a):
|
||||
s.reset()
|
||||
for i in range(0, len(a), 2):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue