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.zig18
1 files changed, 2 insertions, 16 deletions
diff --git a/src/tui/tui.zig b/src/tui/tui.zig
index d0e923a1..3a5c277e 100644
--- a/src/tui/tui.zig
+++ b/src/tui/tui.zig
@@ -1061,14 +1061,7 @@ test "host watch closes initial race and reloads rename-over PDF while idle" {
if (fd < 0) return error.WatchInitFailed;
defer _ = libc.close(fd);
var watches: file_watch.Table = @splat(null);
- defer for (0..pardes.MAX_PANES) |id| file_watch.watchPane(
- fd,
- &watches,
- @intCast(id),
- null,
- 0,
- .{ .text = 0 },
- );
+ defer file_watch.unwatchAll(fd, &watches);
const core = try pardes.Pardes.init(gpa, .{ .file = path, .cols = 80, .rows = 28 });
defer core.deinit();
@@ -1775,14 +1768,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));
- for (0..pardes.MAX_PANES) |wid| file_watch.watchPane(
- sh.inotify_fd,
- &sh.watches,
- @intCast(wid),
- null,
- 0,
- .{ .text = 0 },
- );
+ 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.