aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2020-10-04 12:03:45 +0000
committerDaniel Eklöf <daniel@ekloef.se>2020-10-11 17:25:46 +0000
commit6a8130c12278d9f24791bc3508e96fcd33e1490f (patch)
tree562b8cb3b0fec62be54e73ac0277a9b8913201a8
parentsixel: TOOD -> TODO (fixes codespell build error) (diff)
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.
-rw-r--r--sixel.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sixel.c b/sixel.c
index 157bcc09..4de17c11 100644
--- a/sixel.c
+++ b/sixel.c
@@ -243,7 +243,7 @@ sixel_scroll_up(struct terminal *term, int rows)
int six_start = rebase_row(term, six->pos.row);
if (six_start < rows) {
- sixel_destroy(six);
+ sixel_erase(term, six);
tll_remove(term->grid->sixel_images, it);
} else
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);
if (six_end >= term->grid->num_rows - rows) {
- sixel_destroy(six);
+ sixel_erase(term, six);
tll_remove(term->grid->sixel_images, it);
} else
break;