aboutsummaryrefslogtreecommitdiff
path: root/terminal.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-07-14 10:03:35 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-07-14 10:05:24 +0000
commitb035469a7fba0908ecaabdd739bd4fe22de2ff8b (patch)
tree9bc785aedd6b1f07901c2ccd7892e0a1070b6b5c /terminal.c
parentgrid: reflow: use width=1 for invalid characters (diff)
term: print: manually increment cursor column
We know we're within bounds, and thus we don't need the extra overhead of term_cursor_right().
Diffstat (limited to 'terminal.c')
-rw-r--r--terminal.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/terminal.c b/terminal.c
index 25f83e07..fa1a13ba 100644
--- a/terminal.c
+++ b/terminal.c
@@ -2427,9 +2427,10 @@ term_print(struct terminal *term, wchar_t wc, int width)
}
/* Advance cursor */
- if (term->grid->cursor.point.col < term->cols - 1)
- term_cursor_right(term, 1);
- else
+ if (term->grid->cursor.point.col < term->cols - 1) {
+ term->grid->cursor.point.col++;
+ assert(!term->grid->cursor.lcf);
+ } else
term->grid->cursor.lcf = true;
}