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:
Daniel Eklöf 2020-02-10 21:52:14 +01:00
parent 3004c650ef
commit 4a169f5643
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
4 changed files with 17 additions and 4 deletions

View file

@ -1494,6 +1494,14 @@ term_scroll_reverse(struct terminal *term, int rows)
term_scroll_reverse_partial(term, term->scroll_region, rows);
}
void
term_formfeed(struct terminal *term)
{
if (term->cursor.point.col > 0)
term->grid->cur_row->cells[term->cursor.point.col - 1].attrs.linefeed = 1;
term_cursor_left(term, term->cursor.point.col);
}
void
term_linefeed(struct terminal *term)
{