diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-20 04:37:04 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-20 04:40:28 -0300 |
| commit | 0165bc532446e61a74af604c493d6b354abf798a (patch) | |
| tree | caa29055a3cccadca6cd1546c18218a3f8b22fa8 /core/Core.zig | |
| parent | e1a47cef599070e3ea268255ef4c1164e4a3169b (diff) | |
| download | pardes-0165bc532446e61a74af604c493d6b354abf798a.tar.gz pardes-0165bc532446e61a74af604c493d6b354abf798a.zip | |
builtins: a far client's Del with a pane above and below is instant: the step that asks which way the space goes reads no clock (it asked the host's `now`, an answering entry a speculation stops at: the bytes soak's one stop off may_wait, a client's key d), its question's time is `Pane.question_asked` until the next advance, which counts the delay from its own time (Core.advance, the host's clock in its pump, right after the key's step; a client has the session's advance in its unit), so the question still shows 400 ms after it was asked in an idle session whose core time is seconds old; not a guessed clock: the core's clock is its host's (SDL's ticks on the window) where a guess is the session's CLOCK_MONOTONIC, so a guessed due time would be in another base than the clock it is compared with; nextWake skips a question not timed yet; a host with no clock (macOS's) never advances, and its question waited for ever before as now; test: a far client's Del with panes above and below applies both keys at once (failed on the base: 1 applied of 2, stopped at `d`), confirms with nothing mispredicted, and after the session's next pump its question's time is the session's clock plus the delay on both; the keys test of the delay times it with an advance; no layout moves (the field keeps its type), the semantics word stays 92963bab2e4436fb; exec.clockNow keeps its two REPL callers (a paste's Enter: a pty write that stops a far client anyway, and the session's own output steps); tui core-test 857/1010 (153 skipped), shell-test 1050/1053 (load 10-15)
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 | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/Core.zig b/core/Core.zig index 9a542940..c8880a6a 100644 --- a/core/Core.zig +++ b/core/Core.zig @@ -2073,7 +2073,7 @@ pub fn nextWake(p: *const Pardes) ?u64 { }; // Del's question goes up at the end of its delay: a frame then, and // none after (stepped time has reached it). - for (p.panes) |slot| if (slot) |pane| if (pane.prompt == .del_side and pane.question_due_ns > p.clock.stepped_ns) { + for (p.panes) |slot| if (slot) |pane| if (pane.prompt == .del_side and pane.question_due_ns > p.clock.stepped_ns and pane.question_due_ns != Pane.question_asked) { const wait = @max(1, (pane.question_due_ns - p.clock.stepped_ns + frame_ns - 1) / frame_ns); frames = if (frames) |soonest| @min(soonest, wait) else wait; }; @@ -2114,6 +2114,10 @@ fn advanceInner(p: *Pardes, now_ns: u64) void { p.clock.started = true; p.clock.now_ns = now_ns; if (!started) p.clock.stepped_ns = now_ns; + // Del's question asked since the last advance: its delay from now. + for (p.panes) |slot| if (slot) |pane| if (pane.question_due_ns == Pane.question_asked) { + pane.question_due_ns = now_ns + config.del_question_delay_ns; + }; const frame = frame_ns; var moving: u32 = 0; // The session's ticks are the recording session's: a picture still |
