szn

Bug 13 — Copy mode broken for scrolled content

13. Copy mode broken for scrolled content

File: src/mode_copy.zig:181–218 Severity: HIGH Status: ✅ FIXED

yankSelection() only reads from grid.getCell(x, y) which accesses the visible grid. The scroll_offset field is tracked but never used to index into grid.history. Copying/yanking scrolled-back content is impossible.

Fix: Added getCellAt() helper that maps (x, screen_y) to the correct source (history or visible grid) using scroll_offset. Test added.