From fd8a3992745b9ec51b6e6c1dfc39faf01369b680 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sun, 17 Nov 2019 12:14:45 +0100 Subject: [PATCH] vt: replace pre_print() with term_autowrap() --- vt.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/vt.c b/vt.c index bcce4052..0257879b 100644 --- a/vt.c +++ b/vt.c @@ -712,18 +712,6 @@ esc_dispatch(struct terminal *term, uint8_t final) } } -static inline void -pre_print(struct terminal *term) -{ - if (unlikely(term->cursor.lcf) && term->auto_margin) { - if (term->cursor.point.row == term->scroll_region.end - 1) { - term_scroll(term, 1); - term_cursor_to(term, term->cursor.point.row, 0); - } else - term_cursor_to(term, term->cursor.point.row + 1, 0); - } -} - static inline void post_print(struct terminal *term) { @@ -754,7 +742,7 @@ print_insert(struct terminal *term, int width) static void action_print_utf8(struct terminal *term) { - pre_print(term); + term_autowrap(term); struct row *row = term->grid->cur_row; struct cell *cell = &row->cells[term->cursor.point.col]; @@ -798,7 +786,7 @@ action_print_utf8(struct terminal *term) static void action_print(struct terminal *term, uint8_t c) { - pre_print(term); + term_autowrap(term); struct row *row = term->grid->cur_row; struct cell *cell = &row->cells[term->cursor.point.col];