From 8168fc19dff6616312496a194fb70dff5827e5f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Sun, 4 Oct 2020 14:03:45 +0200 Subject: [PATCH] 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. --- sixel.c | 4 ++-- 1 file 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;