sixel: don't erase if cursor is *before* the image

This commit is contained in:
Daniel Eklöf 2020-06-10 18:43:42 +02:00
parent cc5dedc259
commit e0dc01f2ee
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -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);
}