diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-07-14 09:25:06 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-07-14 09:25:06 +0000 |
| commit | b8c7dfba5c3fd6a2bd0ac28663c0c5d55ee2ed4a (patch) | |
| tree | 11d86d414a3e0b30770c9f614ccb009008e866b0 | |
| parent | grid: reflow: force line-wrap if a multi-column character does not fit on current line (diff) | |
term: line-wrap: manually set cursor row+col
line-wrap is in the hot path, and term_cursor_down/left adds
additional checks that we don't need.
| -rw-r--r-- | terminal.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -2354,11 +2354,15 @@ print_linewrap(struct terminal *term) return; } + term->grid->cursor.lcf = false; if (term->grid->cursor.point.row == term->scroll_region.end - 1) term_scroll(term, 1); - else - term_cursor_down(term, 1); - term_cursor_left(term, term->grid->cursor.point.col); + else { + assert(term->grid->cursor.point.row < term->scroll_region.end - 1); + term->grid->cursor.point.row++; + } + + term->grid->cursor.point.col = 0; } static inline void |
