mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-05-05 06:47:25 -04:00
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:
parent
c96a0b3b3c
commit
89559d5466
6 changed files with 136 additions and 129 deletions
6
sixel.c
6
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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue