aboutsummaryrefslogtreecommitdiff
path: root/sixel.c
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2023-10-12 14:22:50 +0000
committerDaniel Eklöf <daniel@ekloef.se>2023-10-12 14:31:37 +0000
commit4aa67e464a04bf64d30aff70019ce0d8b4d5e136 (patch)
treeeb3bce7f888e2879f010d8c92974603413d6731b /sixel.c
parentshm: memfd_create: fallback to not using MFD_NOEXEC_SEAL (diff)
sixel: erase: fix clearing of cell->attrs.clean
When erasing a sixel, the cells underneath it must be marked as 'dirty', in order to be re-rendered. This was not being done correctly; the for loop loops *from* the start col, meaning the *end* col is *not* sixel->pos.col, as that's the *number* of columns, not the *end* column.
Diffstat (limited to 'sixel.c')
-rw-r--r--sixel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sixel.c b/sixel.c
index bd2ebe1d..8a0b130f 100644
--- a/sixel.c
+++ b/sixel.c
@@ -180,7 +180,7 @@ sixel_erase(struct terminal *term, struct sixel *sixel)
row->dirty = true;
- for (int c = sixel->pos.col; c < min(sixel->cols, term->cols); c++)
+ for (int c = sixel->pos.col; c < min(sixel->pos.col + sixel->cols, term->cols); c++)
row->cells[c].attrs.clean = 0;
}