fix(gpu): resize the gutter buffer so line numbers don't stop at ~10

The GPU window opens at 800x200 and the gutter buffer was sized to that
height once at construction. On resize the code buffer is re-sized but the
gutter buffer wasn't, so `shape_until_scroll` only shaped the ~10 lines
that fit the stale 200px height — line numbers stopped at 10 in a
full-height window (the code + every other buffer scaled fine).

Add `gutter_buffer.set_size(width, height)` to the resize handler,
alongside the code/status buffers. The headless path already sizes it
correctly at construction (its window size is final), so its render test
is unaffected.

Validated: fmt + clippy clean; 53 pmacs-gpu tests pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014TXbAwk27agwhrNNrhLi2U
This commit is contained in:
Levi Neuwirth 2026-07-06 17:41:23 -04:00
parent 1ea2d5f17f
commit 3370ae32ac
1 changed files with 8 additions and 0 deletions

View File

@ -3758,6 +3758,14 @@ impl State {
Some(width as f32),
Some(STATUS_BAND_HEIGHT),
);
// UX gutter: resize the line-number buffer too, else it keeps its
// construction-time (800x200) height and `shape_until_scroll` only
// shapes the ~10 lines that fit — the "numbers stop at 10" bug.
self.gutter_buffer.set_size(
&mut self.font_system,
Some(width as f32),
Some(height as f32),
);
// A taller/shorter window changes the visible line count, so the
// slice + scoped viewport change (session S1).
self.reshape();