aboutsummaryrefslogtreecommitdiff
path: root/terminal.c
diff options
context:
space:
mode:
Diffstat (limited to 'terminal.c')
-rw-r--r--terminal.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/terminal.c b/terminal.c
index deb9ba81..e747009a 100644
--- a/terminal.c
+++ b/terminal.c
@@ -3680,11 +3680,13 @@ term_print(struct terminal *term, char32_t wc, int width)
grid_row_uri_range_erase(row, col, col + width - 1);
/* Advance cursor the 'additional' columns while dirty:ing the cells */
- for (int i = 1; i < width && col < term->cols; i++) {
+ for (int i = 1; i < width && (col + 1) < term->cols; i++) {
col++;
print_spacer(term, col, width - i);
}
+ xassert(col < term->cols);
+
/* Advance cursor */
if (unlikely(++col >= term->cols)) {
grid->cursor.lcf = true;
@@ -3726,6 +3728,7 @@ ascii_printer_fast(struct terminal *term, char32_t wc)
/* Advance cursor */
if (unlikely(++col >= term->cols)) {
+ xassert(col == term->cols);
grid->cursor.lcf = true;
col--;
} else