aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2019-06-29 19:15:32 +0000
committerDaniel Eklöf <daniel@ekloef.se>2019-06-29 19:15:32 +0000
commita8f4cb55afdd3aaaac95e14fd117425a375aa358 (patch)
tree8cc3dc9dd7c698e9f19eaf31f17ca1d49a6aa3e6 /main.c
parentterminal: move fore/background colors from grid to terminal (diff)
terminal: move cursor from grid to terminal
Diffstat (limited to 'main.c')
-rw-r--r--main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/main.c b/main.c
index 931b3431..93740fc9 100644
--- a/main.c
+++ b/main.c
@@ -96,7 +96,7 @@ grid_render_update(struct context *c, struct buffer *buf, const struct damage *d
//LOG_DBG("UPDATE: %d (%dx%d)", linear_cursor, row, col);
const struct cell *cell = &c->term.grid.cells[linear_cursor];
- bool has_cursor = c->term.grid.linear_cursor == linear_cursor;
+ bool has_cursor = c->term.cursor.linear == linear_cursor;
int x = col * c->term.cell_width;
int y = row * c->term.cell_height;
@@ -240,14 +240,14 @@ grid_render_erase(struct context *c, struct buffer *buf, const struct damage *dm
}
/* Redraw cursor, if it's inside the erased range */
- if (c->term.grid.linear_cursor >= dmg->range.start &&
- c->term.grid.linear_cursor < dmg->range.start + dmg->range.length)
+ if (c->term.cursor.linear >= dmg->range.start &&
+ c->term.cursor.linear < dmg->range.start + dmg->range.length)
{
grid_render_update(
c, buf,
&(struct damage){
.type = DAMAGE_UPDATE,
- .range = {.start = c->term.grid.linear_cursor, .length = 1}});
+ .range = {.start = c->term.cursor.linear, .length = 1}});
}
}