diff options
Diffstat (limited to 'src/tui')
| -rw-r--r-- | src/tui/tui.zig | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/tui/tui.zig b/src/tui/tui.zig index a698abf7..dd0baf0b 100644 --- a/src/tui/tui.zig +++ b/src/tui/tui.zig @@ -1464,7 +1464,7 @@ const Screen = struct { /// the terminal back). fn sayDetached(sc: *Screen) void { if (sc.primary) return daemon.tellStubDetached(); - daemon.tellDetached(sc.stub); + daemon.tellStub(sc.stub, "d{s}", .{daemon.name()}); sc.stub = -1; } @@ -1505,7 +1505,7 @@ const Screen = struct { switch (how) { .detach => sc.sayDetached(), .exit => { - daemon.tellExit(sc.stub, 0); + daemon.tellStub(sc.stub, "x{d}", .{0}); sc.stub = -1; }, } @@ -1787,7 +1787,7 @@ fn deliverNote(ctx: *anyopaque, note: daemon.Note) void { const loop: *Loop = @ptrCast(@alignCast(ctx)); switch (note) { .attach => |a| if (a.tty < 0) { - if (a.stub >= 0) daemon.refuseStub(a.stub, "a terminal session takes a terminal"); + if (a.stub >= 0) daemon.tellStub(a.stub, "r{s}", .{"a terminal session takes a terminal"}); } else loop.postEvent(.{ .attach = .{ .tty = a.tty, .stub = a.stub } }) catch { _ = libc.close(a.tty); _ = libc.close(a.stub); @@ -2062,7 +2062,7 @@ const Shell = struct { /// A terminal refused: its stub told why (a test's has none). fn refuse(stub: posix.fd_t, why: []const u8) void { - if (stub >= 0) daemon.refuseStub(stub, why); + if (stub >= 0) daemon.tellStub(stub, "r{s}", .{why}); } fn adopt(ctx: ?*anyopaque, pane: u8) void { @@ -2185,7 +2185,7 @@ const Shell = struct { if (!pardes.views.isOpen(core, t.view) or s.terms[t.view] != null) { if (t.primary) continue; _ = libc.close(t.fd); - if (t.stub >= 0) daemon.tellDetached(t.stub); + if (t.stub >= 0) daemon.tellStub(t.stub, "d{s}", .{daemon.name()}); continue; } const sc = if (t.primary) primary else extra: { @@ -2204,7 +2204,7 @@ const Shell = struct { break :extra sc; } orelse { _ = libc.close(t.fd); - if (t.stub >= 0) daemon.tellDetached(t.stub); + if (t.stub >= 0) daemon.tellStub(t.stub, "d{s}", .{daemon.name()}); continue; }; sc.feed.view = t.view; |
