grid: move 'cursor' state from terminal to grid

This way, the 'normal' and 'alt' grids have their own cursor state,
and we don't need to switch between them.
This commit is contained in:
Daniel Eklöf 2020-04-16 18:51:14 +02:00
parent c96a0b3b3c
commit 89559d5466
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
6 changed files with 136 additions and 129 deletions

View file

@ -101,6 +101,9 @@ struct grid {
int offset;
int view;
struct cursor cursor;
struct cursor saved_cursor;
struct row **rows;
struct row *cur_row;
@ -278,9 +281,6 @@ struct terminal {
} colors;
enum cursor_origin origin;
struct cursor cursor;
struct cursor saved_cursor;
struct cursor alt_saved_cursor;
enum cursor_style default_cursor_style;
enum cursor_style cursor_style;
struct {