diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-07-23 16:15:29 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-07-23 16:15:29 +0000 |
| commit | f6473756d959cfa35c7b9c47a5b66c288b791c86 (patch) | |
| tree | 7903160d1260913f3c2a0afa773875b705ec9711 /sixel.c | |
| parent | sixel: overwrite: use target sixel's height, not cell height (diff) | |
sixel: remove sixel-to-be-splitted *before* splitting it
This fixes an assertion in debug builds, due to the pre-splitted and
splitted sixels overlapping.
Diffstat (limited to 'sixel.c')
| -rw-r--r-- | sixel.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -350,9 +350,11 @@ _sixel_overwrite_by_rectangle( (col <= col_end && col + width - 1 >= col_end) || (col >= col_start && col + width - 1 <= col_end)) { - sixel_overwrite(term, six, start, col, height, width); - sixel_erase(term, six); + struct sixel to_be_erased = *six; tll_remove(term->grid->sixel_images, it); + + sixel_overwrite(term, &to_be_erased, start, col, height, width); + sixel_erase(term, &to_be_erased); } } } @@ -421,9 +423,11 @@ sixel_overwrite_by_row(struct terminal *term, int _row, int col, int width) (col <= col_end && col + width - 1 >= col_end) || (col >= col_start && col + width - 1 <= col_end)) { - sixel_overwrite(term, six, row, col, 1, width); - sixel_erase(term, six); + struct sixel to_be_erased = *six; tll_remove(term->grid->sixel_images, it); + + sixel_overwrite(term, &to_be_erased, row, col, 1, width); + sixel_erase(term, &to_be_erased); } } } |
