Severity: LOW Status: Fixed
None observed in production — the trigger requires an application to emit
U+FE0F immediately after a cell belonging to a sixel image while
variation-selector-always-wide is on. When it fires, the erased cell’s
sixel image reference is dropped from the grid without decrementing
sixel_refcounts, so isImageReferenced stays true and the image is
retained (memory held until a resize/eviction pass frees it).
Bug #225 established the invariant: any overwrite or erase of a cell must
call decrementMainGridRef first (combining-character appends are the sole
exception, because they modify the cell in place without erasing the
marker). The promotion code carefully honours this for the cells it moves
the base char onto and for the padding cells it writes (decrements at
src/screen.zig:742, 749, 787, 800, 807) — but the two setCell(...,
self.eraseCell()) calls that blank the base cell’s original position
(the wrapped-line path and the line-wrap branch) omit it, even though the
comb-append guard (char != ' ' and char != 0) lets sixel marker cells
through.
decrementMainGridRef immediately before both erase overwrites: