From 89559d5466502176995720a33316714012a638d1 Mon Sep 17 00:00:00 2001 From: Daniel Eklöf Date: Thu, 16 Apr 2020 18:51:14 +0200 Subject: 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. --- sixel.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sixel.c') diff --git a/sixel.c b/sixel.c index 98a82deb..f335fdff 100644 --- a/sixel.c +++ b/sixel.c @@ -125,7 +125,7 @@ sixel_delete_in_range(struct terminal *term, int _start, int _end) void sixel_delete_at_cursor(struct terminal *term) { - sixel_delete_at_row(term, term->cursor.point.row); + sixel_delete_at_row(term, term->grid->cursor.point.row); } void @@ -142,8 +142,8 @@ sixel_unhook(struct terminal *term) .height = term->sixel.image.height, .rows = (term->sixel.image.height + term->cell_height - 1) / term->cell_height, .pos = (struct coord){ - term->cursor.point.col, - (term->grid->offset + term->cursor.point.row) & (term->grid->num_rows - 1)}, + term->grid->cursor.point.col, + (term->grid->offset + term->grid->cursor.point.row) & (term->grid->num_rows - 1)}, }; LOG_DBG("generating %dx%d pixman image", image.width, image.height); -- cgit v1.3