diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-05 20:41:32 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-05 22:07:55 -0300 |
| commit | 4c3dbce20f11204f6d4bfb715239beae74259e7f (patch) | |
| tree | 7cc261bdf39843b347b1b1c27829795b2e216774 /src/views.zig | |
| parent | 50914b0e04ac0129b11bff0f0007d5cedbfc7f8d (diff) | |
| download | pardes-4c3dbce20f11204f6d4bfb715239beae74259e7f.tar.gz pardes-4c3dbce20f11204f6d4bfb715239beae74259e7f.zip | |
fields #38, the jump list, the language servers' question and the core's clock are fields of their nouns: Jump.zig is the jump list's type (list, n, cur, force, its own len annotation) and the session's jumps a Jump where it was jumps, njumps, jcur and jump_force; lsp/Ask.zig is the question's (seq, last, wait) and the session's lsp_ask an Ask where it was lsp_seq, lsp_last and lsp_wait; the clock is the session's clock, a Clock (now_ns, stepped_ns, started) where it was now_ns, stepped_ns and clock_started; a view opened still starts with no query's mark on its jumps and one closed leaves the staying view's (views.zig), as when the mark was a field of its own; callers in 26 files read p.jumps.n, p.lsp_ask.wait, p.clock.now_ns (macos.zig's lsp_wait tests by text, built nowhere here; dump.zig, the persistence agent's, only where it names lsp_seq); a dump written before this change loads these as their defaults once: an Upgrade or Restore from it comes back with no jumps, no language question awaited and its clock unstarted (jumps' kind changed, so the decoder says so), and the wire's semantics change; gates on tui: core-test 960/960, behaviour-test 238/238, pane-test 171/172 (1 skipped), snap all 108 scripts ok; gui unit-test 1518/1519 (1 skipped)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/views.zig')
| -rw-r--r-- | src/views.zig | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/views.zig b/src/views.zig index 46959783..dcd11b2c 100644 --- a/src/views.zig +++ b/src/views.zig @@ -35,7 +35,7 @@ pub const fields = [_][:0]const u8{ "screen_w", "screen_h", "cell_pixels", "row_metrics", "ncol", "cols", "col_tags", "finder", "rects", "col_x", "col_w", "active", - "jumps", "njumps", "jcur", "jump_force", + "jumps", "active_column", "native_images", "native_image_patches", "windowed", "drag", "mouse_grab", "window_focused", "focus_told", @@ -436,6 +436,8 @@ pub fn open(p: *Pardes) ?u8 { slot.* = .{ .view = .{ .screen_w = p.screen_w, .screen_h = p.screen_h } }; inline for (sized ++ laid_out ++ .{ "windowed", "native_images", "native_image_patches" }) |name| @field(slot.view, name) = @field(p, name); + // A query's mark on the jumps is the view's that asked it. + slot.view.jumps.force = false; slot.view.col_tags = @splat(.{ .what = .column, .gpa = p.gpa }); for (p.panes, 0..) |s, id| { const pane = s orelse continue; @@ -449,7 +451,7 @@ pub fn open(p: *Pardes) ?u8 { /// How a view is laid out and focused: what a new one takes of the live /// one (`open`), and what one going leaves the view that stays (`closeKeeping`). -const laid_out = .{ "ncol", "cols", "finder", "active", "active_column", "jumps", "njumps", "jcur" }; +const laid_out = .{ "ncol", "cols", "finder", "active", "active_column", "jumps" }; const sized = .{ "screen_w", "screen_h", "cell_pixels", "row_metrics" }; /// View `k` gone, and the view that stays live laid out as `k` was: its @@ -465,7 +467,9 @@ pub fn closeKeeping(p: *Pardes, k: u8) void { const slot = p.parked[other].?; // Its size too: the terminals it sized keep theirs, no shell redrawn for // a size it is given back at the rejoin. + const force = slot.view.jumps.force; inline for (sized ++ laid_out) |name| @field(slot.view, name) = @field(p, name); + slot.view.jumps.force = force; for (p.panes, 0..) |s, id| { const pane = s orelse { slot.serials[id] = 0; |
