diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2025-02-05 10:36:53 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2025-02-06 13:02:38 +0000 |
| commit | d7e8f29ee24365a5aeeca4460afa228a32308e49 (patch) | |
| tree | 5067eb9879c1b1692ed71c09c02dbfd46796aff6 | |
| parent | term: print-non-ascii: propagate existing forced-width (diff) | |
grid: reflow: get number of spacers to insert from the old grid
When checking if we're breaking in the middle of a multi-column
character, we counted spacers starting from the break point. But,
the character may be wider than that. Use the fact that the spacers
cells encode how many *more* there are after them; when we get to the
first one, we know exactly how wide the character is.
| -rw-r--r-- | grid.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1056,8 +1056,8 @@ grid_resize_and_reflow( from + amount < old_cols && old_row->cells[from + amount].wc >= CELL_SPACER + 1)) { + spacers = old_row->cells[from + amount].wc - CELL_SPACER + 1; amount--; - spacers++; } xassert( |
