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/tui/tui.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/tui/tui.zig')
| -rw-r--r-- | src/tui/tui.zig | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/tui/tui.zig b/src/tui/tui.zig index 05d29272..1e4b238e 100644 --- a/src/tui/tui.zig +++ b/src/tui/tui.zig @@ -1949,7 +1949,7 @@ const Shell = struct { const s = of(ctx); if (s.waited) { s.waited = false; - if (s.mail_only and s.peers.count() > 0 and s.core.clock_started) return s.core.now_ns; + if (s.mail_only and s.peers.count() > 0 and s.core.clock.started) return s.core.clock.now_ns; } return s.test_clock orelse @intCast(std.Io.Clock.awake.now(s.io).nanoseconds); } @@ -2286,7 +2286,7 @@ const Shell = struct { if (wait != 0) { // A virtual clock moves a frame a wake while the tty's own // motions move (the glide), as the real one would. - s.wake_to = s.core.nextWake() orelse if (s.moving()) s.core.now_ns + pardes.frame_ns else 0; + s.wake_to = s.core.nextWake() orelse if (s.moving()) s.core.clock.now_ns + pardes.frame_ns else 0; requestWake(s.io, wait); } pardes.turn.rest(); @@ -2958,17 +2958,17 @@ test "TTY queued results reject old PTY generations and LSP request IDs" { try std.testing.expect(std.mem.indexOf(u8, text, "current session") != null); core.lspRequest(0, .status, ""); - const old_id = core.lsp_wait.?.id; + const old_id = core.lsp_ask.wait.?.id; core.lspRequest(0, .status, ""); - const current_id = core.lsp_wait.?.id; + const current_id = core.lsp_ask.wait.?.id; shell.lsp_task = .{ .id = current_id, .future = .{ .any_future = null, .result = {} } }; _ = shell.apply(.{ .lsp_done = .{ .id = old_id, .rows = try gpa.dupe(u8, "stale result\n") } }); try std.testing.expect(shell.lsp_task != null); try std.testing.expectEqual(current_id, shell.lsp_task.?.id); - try std.testing.expectEqual(current_id, core.lsp_wait.?.id); + try std.testing.expectEqual(current_id, core.lsp_ask.wait.?.id); _ = shell.apply(.{ .lsp_done = .{ .id = current_id, .rows = try gpa.dupe(u8, "") } }); try std.testing.expect(shell.lsp_task == null); - try std.testing.expect(core.lsp_wait == null); + try std.testing.expect(core.lsp_ask.wait == null); } test "TTY worker setup failures finish matching LSP and pipe requests" { @@ -2997,14 +2997,14 @@ test "TTY worker setup failures finish matching LSP and pipe requests" { }; core.lspRequest(core.active, .status, ""); const req: host_io.Lsp.Request = .{ - .id = core.lsp_wait.?.id, + .id = core.lsp_ask.wait.?.id, .kind = .status, .pane = @intCast(core.active), .offset = 0, .arg = "", }; Shell.lsp(&shell, req); - try std.testing.expect(core.lsp_wait == null); + try std.testing.expect(core.lsp_ask.wait == null); try std.testing.expectEqualStrings("abc", pane.file.?.content); pane.body.cur_col = 2; |
