summaryrefslogtreecommitdiff
path: root/core/Core.zig
diff options
context:
space:
mode:
Diffstat (limited to 'core/Core.zig')
-rw-r--r--core/Core.zig17
1 files changed, 14 insertions, 3 deletions
diff --git a/core/Core.zig b/core/Core.zig
index a92d35ae..e736d43b 100644
--- a/core/Core.zig
+++ b/core/Core.zig
@@ -2074,7 +2074,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;
};
@@ -2115,6 +2115,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
@@ -2274,6 +2278,15 @@ pub const Options = struct {
startup_config: ?[]const u8 = null,
ninep_name: []const u8 = "",
ninep_tcp: ?[]const u8 = null,
+ /// This process's end of a socket pair its launch made (runtime/main.zig,
+ /// PARDES_PAIR): a session's first client is on it, taken before its
+ /// first effects (runtime/session.zig); a client's session is on it,
+ /// its first join made there with no hello (replica.join).
+ pair: ?c_int = null,
+ /// A client exec'd at an Upgrade (runtime/client.zig `execAgain`,
+ /// PARDES_JOIN_VIEW): the view it had, which the session kept for it
+ /// (views.away), joined again for as a rejoin dials (replica.join).
+ join_view: ?u8 = null,
mounts: []const filesystem.Mount = &.{},
config_dir: ?[]const u8 = null,
/// Where what outlives the session is kept (Db.zig): the user's state
@@ -2503,7 +2516,6 @@ test "LocationsConfig command reports partial updates and survives restore" {
}
test "TreeContext rows in the tag style keep the message rows" {
- if (comptime !syntax.enabled) return error.SkipZigTest;
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true, .cols = 60, .rows = 16 });
defer p.deinit();
const pane = try p.setTestFile("pub const Box = struct {\n pub fn run() void {\n" ++ (std.mem.asBytes(&@as([30][16]u8, @splat(" // body\n".*)))) ++ " }\n};\n");
@@ -2546,7 +2558,6 @@ test "TreeContext rows in the tag style keep the message rows" {
}
test "TreeContext command and custom tag survive a workspace round trip" {
- if (comptime !syntax.enabled) return error.SkipZigTest;
const p = try Pardes.init(std.testing.allocator, .{ .tty_only = true });
defer p.deinit();
const pane = try p.setTestFile("pub fn main() void {}\n");