From e19bdc79f0cc6e8521085c69ba6e22da24fce8a4 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 5 Nov 2026 00:52:01 -0300 Subject: file_watch: every pane's watch is dropped by one call (unwatchAll), where the tty's Restore, the window's Restore and a tty test each wrote the same eight-line loop over every pane Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge --- src/file_watch.zig | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/file_watch.zig') diff --git a/src/file_watch.zig b/src/file_watch.zig index 33c14248..e8155bb9 100644 --- a/src/file_watch.zig +++ b/src/file_watch.zig @@ -419,6 +419,11 @@ pub fn watchPane( } } +/// Every pane's mark dropped (a Restore's old core, a test's end). +pub fn unwatchAll(fd: c_int, watches: *Table) void { + for (0..pardes.MAX_PANES) |id| watchPane(fd, watches, @intCast(id), null, 0, .{ .text = 0 }); +} + /// Mark the post chain files' directories, one slot each, dropping the /// marks of files no longer in it. pub fn watchShaders(fd: c_int, watches: *Table, paths: []const []const u8) void { -- cgit v1.3