grid: reflow: calculate width of composed characters correctly

Before this patch, reflow called `wcwidth()` on our magic values for
composed characters.
This commit is contained in:
Daniel Eklöf 2020-09-06 19:14:46 +02:00
parent f9cbdd3b11
commit 61f950f77a
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
4 changed files with 28 additions and 7 deletions

View file

@ -2110,12 +2110,14 @@ maybe_resize(struct terminal *term, int width, int height, bool force)
grid_reflow(
&term->normal, new_normal_grid_rows, new_cols, old_rows, new_rows,
term->grid == &term->normal ? ALEN(tracking_points) : 0,
term->grid == &term->normal ? tracking_points : NULL);
term->grid == &term->normal ? tracking_points : NULL,
term->composed_count, term->composed);
grid_reflow(
&term->alt, new_alt_grid_rows, new_cols, old_rows, new_rows,
term->grid == &term->alt ? ALEN(tracking_points) : 0,
term->grid == &term->alt ? tracking_points : NULL);
term->grid == &term->alt ? tracking_points : NULL,
term->composed_count, term->composed);
/* Reset tab stops */
tll_free(term->tab_stops);