szn

Bug 316 — Sixel image refcounts leaked on vertical screen shrink in Screen.resize

316. Sixel image refcounts leaked on vertical screen shrink in Screen.resize

File: src/screen.zig:510-525 Severity: HIGH Status: ✅ FIXED

When Screen.resize reduced grid height, lines popped off the bottom of the grid were deallocated without decrementing sixel refcounts for cells in those lines.

Root Cause

Grid height truncation lacked eviction callbacks to Screen.decrementLineRefs.

Fix

Added on_line_evict callback mechanism to Grid which notifies Screen.screenEvictCallback to decrement sixel refcounts whenever lines are evicted or truncated.