grid: track both linear and row,col cursor

This commit is contained in:
Daniel Eklöf 2019-06-17 21:15:20 +02:00
parent 963b266cce
commit 50c43be0d9
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
6 changed files with 95 additions and 27 deletions

2
main.c
View file

@ -97,7 +97,7 @@ grid_render(struct context *c)
cell->dirty = false;
bool has_cursor = c->term.grid.cursor == cell_idx;
bool has_cursor = c->term.grid.linear_cursor == cell_idx;
int y_ofs = row * c->term.grid.cell_height + c->fextents.ascent;
int x_ofs = col * c->term.grid.cell_width;