summaryrefslogtreecommitdiff
path: root/src/tui/tui.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/tui/tui.zig')
-rw-r--r--src/tui/tui.zig19
1 files changed, 2 insertions, 17 deletions
diff --git a/src/tui/tui.zig b/src/tui/tui.zig
index 3a5c277e..5c16f1be 100644
--- a/src/tui/tui.zig
+++ b/src/tui/tui.zig
@@ -6,7 +6,6 @@ const libc = std.c;
const vaxis = @import("vaxis");
const pardes = @import("../pardes.zig");
const vaxis_input = @import("../vaxis_input.zig");
-const dump = @import("../dump.zig");
const tracy = @import("../tracy.zig");
const look = @import("../look.zig");
const message = pardes.Messages.Message;
@@ -1749,18 +1748,7 @@ fn localSession(
// off a startup's way.
daemon.watch(loop, deliverNote);
if (core.takeRestore()) |rp| blk: {
- // ponytail: a Restore replaces the core its clients replicate;
- // they are let go, and attach again.
- sh.peers.dropAll(core);
- const bytes = filesystem.readRestore(gpa, rp, core.settings.dump_dir.get()) catch |err| {
- core.reportError(core.active, "Restore", err);
- break :blk;
- };
- defer gpa.free(bytes);
- const nc = dump.restore(core, bytes, rp) catch |err| {
- core.reportError(core.active, "Restore", err);
- break :blk;
- };
+ const nc = host_io.restoreCore(gpa, core, rp, &sh.peers, sh.inotify_fd, &sh.watches) orelse break :blk;
if (sh.lsp_task) |*task| {
task.future.cancel(io);
sh.lsp_task = null;
@@ -1768,10 +1756,7 @@ fn localSession(
sh.pipe_tasks.cancelAll(io);
for (&sh.gens) |*generation| generation.* +%= 1;
for (0..pardes.MAX_PANES) |pane| Shell.closePty(&sh, @intCast(pane));
- file_watch.unwatchAll(sh.inotify_fd, &sh.watches);
- _ = file_watch.applyThemeEffect(core, gpa, sh.inotify_fd, &sh.watches, 0, false, false);
- // ponytail: a restored session is one view, the live one's
- // terminal: the others are let go, as a detach of each.
+ // One view, the live one's terminal (host_io.restoreCore).
const live = sh.term().?;
for (&sh.terms) |*slot| if (slot.*) |sc| if (sc != live) {
stopInput(io, &sc.thread);