szn

Bug 434 — Region scroll paths skip shiftSixelAnchors, desyncing sixel image anchors

434. Region scroll paths skip shiftSixelAnchors, desyncing sixel image anchors

Severity: MEDIUM Status: Fixed

The full-grid scroll operations call shiftSixelAnchors(delta) to keep sixel image anchor_row values in sync with content movement. The region scroll helpers do not:

// src/screen.zig:592-608 (scrollUpInRegion) and 610-626 (scrollDownInRegion)
// swap lines within [top, bottom] but never call shiftSixelAnchors(...)

Contrast with the non-region paths, which do shift anchors:

// src/screen.zig:373, 410, 640, 1196, 1204, 1238, 1246 — shiftSixelAnchors(...) on scroll

Problem & Impact

Proposed Fix

Call shiftSixelAnchors(delta_rows) inside scrollUpInRegion/scrollDownInRegion for the lines actually moved (respecting the alt_screen tag so only the active screen’s images shift, per bug #219), mirroring the full-grid scroll behavior.