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

4
grid.h
View file

@ -10,7 +10,9 @@ void grid_reflow(
struct grid *grid, int new_rows, int new_cols,
int old_screen_rows, int new_screen_rows,
size_t tracking_points_count,
struct coord *const tracking_points[static tracking_points_count]);
struct coord *const tracking_points[static tracking_points_count],
size_t compose_count,
const struct composed composed[static compose_count]);
static inline int
grid_row_absolute(const struct grid *grid, int row_no)