diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-07-14 08:51:22 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-07-14 08:51:22 +0000 |
| commit | 6faa9955ba42af378057eccc3645c1b8a9599dd7 (patch) | |
| tree | 03d07f9941c5986c4b3262ef66d3c68e6bdbdae9 | |
| parent | term: 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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |
