grid: reflow: check the *entire* row for non-empty cells

This commit is contained in:
Daniel Eklöf 2021-05-28 17:41:13 +02:00
parent c2314d689e
commit ef1fdc40c8
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

2
grid.c
View file

@ -523,7 +523,7 @@ grid_resize_and_reflow(
/* Find last non-empty cell */
int col_count = 0;
for (int c = old_cols - 1; c > 0; c--) {
for (int c = old_cols - 1; c >= 0; c--) {
const struct cell *cell = &old_row->cells[c];
if (!(cell->wc == 0 || cell->wc == CELL_SPACER)) {
col_count = c + 1;