vt: handle cursor-at-right-edge

When printing to the right-most-cell, don't advance the
cursor. Instead, set a flag that indicates that the *next* print
should line-wrap.
This commit is contained in:
Daniel Eklöf 2019-06-17 20:53:05 +02:00
parent 4585df532c
commit 963b266cce
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
3 changed files with 11 additions and 2 deletions

1
grid.c
View file

@ -25,6 +25,7 @@ grid_cursor_move(struct grid *grid, int cols)
grid->cells[new_cursor].dirty = true;
grid->cursor = new_cursor;
grid->dirty = true;
grid->print_needs_wrap = false;
}
void