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/Messages.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/Messages.zig')
| -rw-r--r-- | src/Messages.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Messages.zig b/src/Messages.zig index 8fa89125..fbcc0343 100644 --- a/src/Messages.zig +++ b/src/Messages.zig @@ -525,7 +525,7 @@ fn collectBands(p: *Pardes, pane: *Pane, r: Rect, id: usize) void { if (id == p.active and p.leader_on) pane.notices.push(.leader); // Del's question shows once its delay is up: answered before that, it // was never there. - const del_waiting = pane.prompt == .del_side and pane.question_due_ns > p.now_ns; + const del_waiting = pane.prompt == .del_side and pane.question_due_ns > p.clock.now_ns; if (pane.promptText()) |text| if (text.len > 0 and !del_waiting) pane.notices.push(.prompt); // A pane only has so many rows to give. When they do not all fit the // LAST ones survive, because the prompt is last and it is the one @@ -886,7 +886,7 @@ test "an idle core wants no wake and a lingering message sleeps to its linger's p.update(.{ .key = .{ .cp = 'x' } }); try std.testing.expectEqual(Pane.MessagePhase.lingering, pane.msg_life.phase); const linger = messageFrames(p.settings.message_linger_ms); - const due = p.stepped_ns + linger * frame; + const due = p.clock.stepped_ns + linger * frame; try std.testing.expectEqual(@as(?u64, due), p.nextWake()); p.needs_frame = false; p.advance(due - frame); @@ -901,7 +901,7 @@ test "an idle core wants no wake and a lingering message sleeps to its linger's try std.testing.expect(p.executeBuiltinLine(p.active, "MessageLinger 5000")); try std.testing.expect(p.executeBuiltinLine(p.active, "Msg again")); p.update(.{ .key = .{ .cp = 'x' } }); - const long_due = p.stepped_ns + messageFrames(5000) * frame; + const long_due = p.clock.stepped_ns + messageFrames(5000) * frame; try std.testing.expectEqual(@as(?u64, long_due), p.nextWake()); p.advance(long_due); try std.testing.expectEqual(@as(usize, 0), pane.msg_len); |
