From b035469a7fba0908ecaabdd739bd4fe22de2ff8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Tue, 14 Jul 2020 12:03:35 +0200 Subject: [PATCH] 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(). --- terminal.c | 7 ++++--- 1 file 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; }