From 3370ae32ac096dd9f20e4a0c9c911fa018a1d681 Mon Sep 17 00:00:00 2001 From: Levi Neuwirth Date: Mon, 6 Jul 2026 17:41:23 -0400 Subject: [PATCH] fix(gpu): resize the gutter buffer so line numbers don't stop at ~10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) Claude-Session: https://claude.ai/code/session_014TXbAwk27agwhrNNrhLi2U --- pmacs-gpu/src/main.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pmacs-gpu/src/main.rs b/pmacs-gpu/src/main.rs index 48b85cb..981df12 100644 --- a/pmacs-gpu/src/main.rs +++ b/pmacs-gpu/src/main.rs @@ -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();