mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-11 04:27:49 -05:00
grid: reflow: use width=1 for invalid characters
This commit is contained in:
parent
98ebb99be3
commit
466466c19e
1 changed files with 1 additions and 1 deletions
2
grid.c
2
grid.c
|
|
@ -221,7 +221,7 @@ grid_reflow(struct grid *grid, int new_rows, int new_cols,
|
|||
const struct cell *old_cell = &old_row->cells[c - empty_count + i];
|
||||
|
||||
/* Out of columns on current row in new grid? */
|
||||
if (new_col_idx + wcwidth(old_cell->wc) > new_cols)
|
||||
if (new_col_idx + max(1, wcwidth(old_cell->wc)) > new_cols)
|
||||
line_wrap();
|
||||
|
||||
assert(new_row != NULL);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue