diff options
| author | Gabriel Schneider <[email protected]> | 2026-10-29 12:22:50 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-29 16:56:17 -0300 |
| commit | c9a09e591b1f45a9979debaaff26509a89e2bdeb (patch) | |
| tree | cad00de039c13794c92434f6c6221bbb42f5f3e6 /src | |
| parent | a4b85cb7689c111c9f06891164e765a1b49f63c8 (diff) | |
| download | pardes-c9a09e591b1f45a9979debaaff26509a89e2bdeb.tar.gz pardes-c9a09e591b1f45a9979debaaff26509a89e2bdeb.zip | |
the render draws a file body from the geometry its key says is current, not one made again for every frame
File.geometry is made by whoever asks first, a step or the frame; the
render made it afresh all the same (so that an input its key missed
would show only as a headless divergence, never as a stale frame).
That cost every scroll a third walk of the body's rows: the step made
the map for its ensureCursorVisible, the frame made it again, and the
paint walked it. PageDown in the perf harness ran 4% over the base,
outside its 2% A/A spread. Drawn from the step's map, a scroll walks
the rows twice, as before the geometry was the step's. An input the key
misses now shows as a stale frame, which the snapshot goldens catch
(all 110 unchanged).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src')
| -rw-r--r-- | src/body_layer.zig | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/body_layer.zig b/src/body_layer.zig index 5bffb691..5a8d51e5 100644 --- a/src/body_layer.zig +++ b/src/body_layer.zig @@ -170,9 +170,8 @@ pub fn buttonInks(th: *const colors.Theme) [3][3]u8 { /// rail is the grid's alone. pub fn joinBody(p: *Pardes, s: *Surface, arena: std.mem.Allocator, pane: *Pane, r: Rect, id: usize, active: bool, rail: pardes.Region) !void { if (pane.file == null) return renderBody(p, s, arena, pane, r, id, active, rail, null); - // Made afresh for every frame from the pane as it is, as a step reading - // it would make it (File.geometry): never only by drawing. - pane.geometry_key = 0; + // The pane's geometry as it is (File.geometry): made by the step that + // moved it if one read it, else here, and the same either way. panes.File.geometry(pane); // Which rows are context rows is decided by the text the body shows: a // layer taller than the grid's rows when there are any. |
