szn

Bug 198 — Copy-mode / scrollback sixel is silently lost after the 64-image ring wraps

198. Copy-mode / scrollback sixel is silently lost after the 64-image ring wraps

File: src/screen.zig:86–87 ([64]?SixelImage), src/server/render.zig:694–710 (id-mismatch clear) Severity: MEDIUM Status: ✅ FIXED — Added check to avoid evicting sixel images still referenced by cells in the active grid/history, and updated renderer lookup accordingly.

The registry is a fixed 64-slot ring. We now avoid overwriting slots whose images are still referenced in the grid/history (using isImageReferenced checks on eviction), and resolve lookups dynamically in render.zig using helper methods (findSixelImage/findSixelImageSlot) rather than assuming id % 64.