aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-07-14 08:51:22 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-07-14 08:51:22 +0000
commit6faa9955ba42af378057eccc3645c1b8a9599dd7 (patch)
tree03d07f9941c5986c4b3262ef66d3c68e6bdbdae9
parentterm: insert: move assert() after checking whether insert mode is enabled or not (diff)
term: print: manually increment cursor column for multi-column chars
There's nothing wrong with using term_cursor_right(), but it is unnecessary since we already check for the end-of-line.
-rw-r--r--terminal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/terminal.c b/terminal.c
index 27bfba8f..78f64510 100644
--- a/terminal.c
+++ b/terminal.c
@@ -2405,9 +2405,9 @@ term_print(struct terminal *term, wchar_t wc, int width)
/* Advance cursor the 'additional' columns while dirty:ing the cells */
for (int i = 1; i < width && term->grid->cursor.point.col < term->cols - 1; i++) {
- term_cursor_right(term, 1);
-
+ term->grid->cursor.point.col++;
assert(term->grid->cursor.point.col < term->cols);
+
struct cell *cell = &row->cells[term->grid->cursor.point.col];
cell->wc = 0;
cell->attrs.clean = 0;