From ef1fdc40c8fd10411e7c40e0fe0d6982a702f505 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Fri, 28 May 2021 17:41:13 +0200 Subject: [PATCH] grid: reflow: check the *entire* row for non-empty cells --- grid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grid.c b/grid.c index 6d8f93c3..a2b0c0fc 100644 --- a/grid.c +++ b/grid.c @@ -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;