From e0dc01f2ee7ab943599051d785ef33169c74631b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Wed, 10 Jun 2020 18:43:42 +0200 Subject: [PATCH] sixel: don't erase if cursor is *before* the image --- sixel.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sixel.c b/sixel.c index d691507c..e9d2d5f2 100644 --- a/sixel.c +++ b/sixel.c @@ -93,9 +93,10 @@ sixel_delete_at_point(struct terminal *term, int _row, int col) const int six_end = six_start + six->rows - 1; if (row >= six_start && row <= six_end) { + const int col_start = six->pos.col; const int col_end = six->pos.col + six->cols; - if (col < col_end) { + if (col >= col_start && col < col_end) { sixel_erase(term, six); tll_remove(term->grid->sixel_images, it); }