diff options
Diffstat (limited to 'core/builtins.zig')
| -rw-r--r-- | core/builtins.zig | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/core/builtins.zig b/core/builtins.zig index 2740e05a..894478fd 100644 --- a/core/builtins.zig +++ b/core/builtins.zig @@ -547,8 +547,7 @@ pub const Adopt = struct { pub const scope: Scope = .session; pub const enabled = pardes.can_attach; pub fn run(c: Ctx) void { - const adopt = c.p.host.vtable.adopt orelse return c.p.reportFailure(c.id, "Adopt: no pardes daemon is keeping shells for this session"); - adopt(c.p.host.ctx, .at(c.id)); + c.p.tape.host(c.p, .adopt, .{.at(c.id)}) orelse c.p.reportFailure(c.id, "Adopt: no pardes daemon is keeping shells for this session"); } }; @@ -559,8 +558,7 @@ pub const Upgrade = struct { pub const scope: Scope = .session; pub const enabled = pardes.can_attach; pub fn run(c: Ctx) void { - const upgrade = c.p.host.vtable.upgrade orelse return c.p.reportFailure(c.id, "Upgrade: this pardes cannot move to another build in place"); - upgrade(c.p.host.ctx, .at(c.id)); + c.p.tape.host(c.p, .upgrade, .{.at(c.id)}) orelse c.p.reportFailure(c.id, "Upgrade: this pardes cannot move to another build in place"); } }; @@ -700,11 +698,9 @@ pub const Fonts = struct { /// Show the declarations enclosing the top row at the pane's head, on or off. pub const TreeContext = struct { - pub const enabled = pardes.syntax.enabled; pub const takes_arg = true; pub fn run(c: Ctx) void { - if (comptime !enabled) unreachable; if (!panes.File.supportsContext(c.pane)) return c.p.reportFailure(c.id, "TreeContext: only a source file the parser knows has context"); const file = &c.pane.file.?; const arg = std.mem.trim(u8, c.arg orelse "", " \t\r\n"); @@ -1044,7 +1040,7 @@ pub const Del = struct { !c.pane.collapsed and c.pane.prompt == .none) { c.pane.prompt = .del_side; - c.pane.question_due_ns = exec.clockNow(c.p) + config.del_question_delay_ns; + c.pane.question_due_ns = Pane.question_asked; c.p.view().active = c.id; var rec: [32]u8 = undefined; pardes.ctlfs.events.notePath(c.p, "ask", std.fmt.bufPrint(&rec, "{d} del k j", .{c.pane.serial}) catch unreachable); // a u32 fits 32 |
