mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-07 08:21:02 -04:00
sixel: scroll: call sixel_erase() instead of sixel_destroy()
This ensures the screen is updated correctly. Without this, the sixel image would remain on screen until force-refreshed by some other means.
This commit is contained in:
parent
42cc84eab7
commit
8168fc19df
1 changed files with 2 additions and 2 deletions
4
sixel.c
4
sixel.c
|
|
@ -243,7 +243,7 @@ sixel_scroll_up(struct terminal *term, int rows)
|
||||||
|
|
||||||
int six_start = rebase_row(term, six->pos.row);
|
int six_start = rebase_row(term, six->pos.row);
|
||||||
if (six_start < rows) {
|
if (six_start < rows) {
|
||||||
sixel_destroy(six);
|
sixel_erase(term, six);
|
||||||
tll_remove(term->grid->sixel_images, it);
|
tll_remove(term->grid->sixel_images, it);
|
||||||
} else
|
} else
|
||||||
break;
|
break;
|
||||||
|
|
@ -262,7 +262,7 @@ sixel_scroll_down(struct terminal *term, int rows)
|
||||||
|
|
||||||
int six_end = rebase_row(term, six->pos.row + six->rows - 1);
|
int six_end = rebase_row(term, six->pos.row + six->rows - 1);
|
||||||
if (six_end >= term->grid->num_rows - rows) {
|
if (six_end >= term->grid->num_rows - rows) {
|
||||||
sixel_destroy(six);
|
sixel_erase(term, six);
|
||||||
tll_remove(term->grid->sixel_images, it);
|
tll_remove(term->grid->sixel_images, it);
|
||||||
} else
|
} else
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue