This commit is contained in:
Kovid Goyal 2025-07-09 12:49:12 +05:30
parent c681a999d5
commit d7c4d42f41
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C
3 changed files with 14 additions and 2 deletions

View file

@ -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`)

View file

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

View file

@ -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):