diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2021-03-16 07:44:25 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2021-03-16 07:44:25 +0000 |
| commit | d8f0e701b5ce0190bba84bc3d9e151ced420562b (patch) | |
| tree | d7d6b1b6c5a1871e961a11e5ab0661f003f57c19 | |
| parent | sixel: sixel_overwrite_at_cursor(): early exit when the image list is empty (diff) | |
| parent | term: term_print(): assume we’re *not* at the right margin (diff) | |
Merge branch 'term-print-assume-col-can-be-incremented'
| -rw-r--r-- | terminal.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -2848,11 +2848,11 @@ term_print(struct terminal *term, wchar_t wc, int width) } /* Advance cursor */ - if (term->grid->cursor.point.col < term->cols - 1) { - term->grid->cursor.point.col++; - xassert(!term->grid->cursor.lcf); - } else + if (unlikely(++term->grid->cursor.point.col >= term->cols)) { term->grid->cursor.lcf = true; + term->grid->cursor.point.col--; + } else + xassert(!term->grid->cursor.lcf); } enum term_surface |
