Fix a case of failure to overwrite sixel image cells

When the cell to be overwritten contained part of an image, no update
would be issued if the backing cell character appeared unchanged.

We address this by issuing cell updates when the cell intersects with
an image, allowing images to e.g. be reliably erased with spaces.
This commit is contained in:
Hans Petter Jansson
2025-02-10 13:21:02 +01:00
parent ec119b2f9e
commit d171978560
3 changed files with 20 additions and 0 deletions

View File

@@ -2022,6 +2022,10 @@ screen_write_cell(struct screen_write_ctx *ctx, const struct grid_cell *gc)
if (skip) {
if (s->cx >= gl->cellsize)
skip = grid_cells_equal(gc, &grid_default_cell);
#ifdef ENABLE_SIXEL
else if (image_intersect_area(s, s->cx, s->cy, width, 1))
skip = 0;
#endif
else {
gce = &gl->celldata[s->cx];
if (gce->flags & GRID_FLAG_EXTENDED)