diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2019-11-17 11:14:45 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2019-11-17 11:14:45 +0000 |
| commit | fd8a3992745b9ec51b6e6c1dfc39faf01369b680 (patch) | |
| tree | a3b74eafdb8ccda5edbc3f7826bd413cc0ef153b | |
| parent | term: new function: term_autowrap() (diff) | |
vt: replace pre_print() with term_autowrap()
| -rw-r--r-- | vt.c | 16 |
1 files changed, 2 insertions, 14 deletions
@@ -713,18 +713,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) { if (term->cursor.point.col < term->cols - 1) @@ -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]; |
