From 6faa9955ba42af378057eccc3645c1b8a9599dd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Tue, 14 Jul 2020 10:51:22 +0200 Subject: [PATCH] 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. --- terminal.c | 4 ++-- 1 file 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;