diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-24 02:44:13 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-24 04:07:49 -0300 |
| commit | f0f2a5125fd4b034ebcd424afd4a55c3185191ab (patch) | |
| tree | 1f1267a1331c42137678af580b8428a966e0b5bc /core/Core.zig | |
| parent | ed05c825102ebce7cd1e314226a1c88b8658baef (diff) | |
| download | pardes-f0f2a5125fd4b034ebcd424afd4a55c3185191ab.tar.gz pardes-f0f2a5125fd4b034ebcd424afd4a55c3185191ab.zip | |
layout: a view's geometry (`rects`, `col_x`, `col_w`) is the layout pass's, never dumped: every load lays each open view out again (dump.zig `afterLoad`: `layout.compute` per open view, as a resize lays it out), and `cols` is held to `ncol` (`View.replica.len`): RUN FIRST on pardes-merge67 (core/fuzz.zig's dump fuzz, the restore road's seed 589): an image's pane 0 rect read back as 534 rows on a 24-row screen (`View.rects`, dumped as it was), drawn: draw.zig:448 `clearRect`, then surface.zig:322's `at` asserted; walk.zig `pastHeld` passes over a pair whose buffer is derived; TEST FIRST: dump.zig "a view's geometry is laid out again at a load, never read: a pane's rect past its screen in a dump is the layout's after it" (merge67: expected 22, found 534); not whole alone: the dump's layout moved, and the fuzz's seeds then reach the indexes the next change holds (`live` past the views, a file's top past its text)
Co-Authored-By: Claude Opus <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'core/Core.zig')
| -rw-r--r-- | core/Core.zig | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/core/Core.zig b/core/Core.zig index 1894247d..ff0a84ac 100644 --- a/core/Core.zig +++ b/core/Core.zig @@ -87,7 +87,13 @@ const Pardes = @This(); /// One client's view of the session (views.zig): its screen and layout, /// its focus, its pointer and gestures, its jumps, its key prefixes. pub const View = struct { - pub const replica = .{ .len = .{ .{ "leader_keys", "leader_n" }, .{ "col_x", "ncol" }, .{ "col_w", "ncol" } } }; + /// Its geometry (`rects`, `col_x`, `col_w`) is the layout pass's over + /// its columns and screen: never dumped, laid out again at a load + /// (dump.afterLoad), as a resize lays it out. + pub const replica = .{ + .len = .{ .{ "leader_keys", "leader_n" }, .{ "cols", "ncol" }, .{ "col_x", "ncol" }, .{ "col_w", "ncol" } }, + .derived = .{ "rects", "col_x", "col_w" }, + }; /// A view's slot in `Pardes.views`, as it crosses the core's edge: an /// entry's argument or answer, the wire's welcome. A type of its own, /// so a pane's slot (`Pane.Id`) is not taken for it; the core's own |
