From 4a169f5643a5fae6ab2df39adeb32a3222d2811c Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Mon, 10 Feb 2020 21:52:14 +0100 Subject: 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. --- terminal.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'terminal.c') diff --git a/terminal.c b/terminal.c index a07b1912..5c9f0b8b 100644 --- a/terminal.c +++ b/terminal.c @@ -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) { -- cgit v1.3 From b0f98a9d0c0e628f26a01e093c1ed8b7c2a006a7 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Mon, 10 Feb 2020 22:22:42 +0100 Subject: term: font_size_{increase,descrease}: adjust size by 0.5pt --- terminal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'terminal.c') diff --git a/terminal.c b/terminal.c index 5c9f0b8b..97a8a45b 100644 --- a/terminal.c +++ b/terminal.c @@ -1153,13 +1153,13 @@ term_font_size_adjust(struct terminal *term, double amount) void term_font_size_increase(struct terminal *term) { - term_font_size_adjust(term, 1.); + term_font_size_adjust(term, 0.5); } void term_font_size_decrease(struct terminal *term) { - term_font_size_adjust(term, -1.); + term_font_size_adjust(term, -0.5); } void -- cgit v1.3