diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2025-03-29 09:15:13 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2025-03-29 09:16:31 +0000 |
| commit | c8470f40c1f5a850048a5b296a944e07abae716a (patch) | |
| tree | ffad478af666ab348698ac27c2c738d45f36c28d /grid.c | |
| parent | meson: add foot (render.c) -> srgb.h dep (diff) | |
grid: reflow: fix empty line coalescing
If a range of empty lines ended with a non-empty line at the very
bottom of the to-be-resized grid, all those empty lines were removed.
Closes #2011
Diffstat (limited to 'grid.c')
| -rw-r--r-- | grid.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -985,14 +985,12 @@ grid_resize_and_reflow( underline_range = underline_range_terminator = NULL; if (unlikely(col_count > 0 && coalesced_linebreaks > 0)) { - for (size_t apa = 0; apa < coalesced_linebreaks; apa++) { + for (size_t line_no = 0; line_no < coalesced_linebreaks; line_no++) { /* Erase the remaining cells */ memset(&new_row->cells[new_col_idx], 0, (new_cols - new_col_idx) * sizeof(new_row->cells[0])); new_row->linebreak = true; - - if (r + 1 < old_rows) - line_wrap(); + line_wrap(); } coalesced_linebreaks = 0; |
