diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-05 00:52:01 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-05 01:27:20 -0300 |
| commit | e19bdc79f0cc6e8521085c69ba6e22da24fce8a4 (patch) | |
| tree | 4418980e403260983ccf3903b1eb7f306c2fe120 /src/file_watch.zig | |
| parent | d2a066ea4ffe4388fe0da71bd8389649ac59b73f (diff) | |
| download | pardes-e19bdc79f0cc6e8521085c69ba6e22da24fce8a4.tar.gz pardes-e19bdc79f0cc6e8521085c69ba6e22da24fce8a4.zip | |
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 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/file_watch.zig')
| -rw-r--r-- | src/file_watch.zig | 5 |
1 files changed, 5 insertions, 0 deletions
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 { |
