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.
This commit is contained in:
Daniel Eklöf 2020-07-14 10:51:22 +02:00
parent ca7ec13f3b
commit 6faa9955ba
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -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;