mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
grid: reflow: regression: remove (truncate) SPACER cells at the end of line
When printing a double-width glyph at the end of the line, it will get
pushed to the next line if there's only one cell left on the current
line.
That last cell on the current line is filled with a SPACER value.
When reflowing the text, the SPACER cell should be "removed", so that
the double-width glyph continues directly after the text on the
previous line.
9567694bab fixed an issue where
reflowing e.g. neofetch output incorrectly removed spaces between the
logo, and the system info. But also introduced a regression where
SPACER values no longer are removed.
This patch tries to fix it, by adding back empty cells, but NOT SPACER
cells.
This commit is contained in:
parent
f39b75f296
commit
97385b007f
2 changed files with 6 additions and 1 deletions
3
grid.c
3
grid.c
|
|
@ -930,7 +930,8 @@ grid_resize_and_reflow(
|
|||
|
||||
if (!old_row->linebreak && col_count > 0) {
|
||||
/* Don't truncate logical lines */
|
||||
col_count = old_cols;
|
||||
while (col_count < old_cols && old_row->cells[col_count].wc == 0)
|
||||
col_count++;
|
||||
}
|
||||
|
||||
xassert(col_count >= 0 && col_count <= old_cols);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue