mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-08 10:06:22 -05:00
vt: tag cells that were form-feed:ed, to allow correct text reflow
To handle text reflow correctly when a line has a printable character in the last column, but was still line breaked, we need to track the fact that the slave inserted a line break here. Otherwise, when the window width is increased, we'll end up pulling up the next line, when we really should have inserted a line break.
This commit is contained in:
parent
3004c650ef
commit
4a169f5643
4 changed files with 17 additions and 4 deletions
5
render.c
5
render.c
|
|
@ -1055,7 +1055,10 @@ reflow(struct terminal *term, struct row **new_grid, int new_cols, int new_rows,
|
|||
* *entire* old line was empty.
|
||||
*/
|
||||
|
||||
if (empty_count < old_cols && old_row->cells[old_cols - 1].wc == 0) {
|
||||
if (empty_count < old_cols &&
|
||||
(old_row->cells[old_cols - 1].wc == 0 ||
|
||||
old_row->cells[old_cols - 1].attrs.linefeed))
|
||||
{
|
||||
new_col_idx = 0;
|
||||
new_row_idx = (new_row_idx + 1) & (new_rows - 1);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue