summaryrefslogtreecommitdiff
path: root/dev/file_watch.zig
diff options
context:
space:
mode:
Diffstat (limited to 'dev/file_watch.zig')
-rw-r--r--dev/file_watch.zig6
1 files changed, 3 insertions, 3 deletions
diff --git a/dev/file_watch.zig b/dev/file_watch.zig
index a02ad272..84f37c81 100644
--- a/dev/file_watch.zig
+++ b/dev/file_watch.zig
@@ -706,7 +706,7 @@ test "a restored file is watched again: one clean takes what its file became sin
defer watchPane(fd, &watches, id, null, pane.serial, .{ .text = 0 });
var armed = false;
while (core.nextEffect()) |effect| switch (effect) {
- .watch => |watch| if (watch.pane == id and watch.on) {
+ .watch => |watch| if (watch.pane.index() == id and watch.on) {
_ = applyEffect(core, io, fd, &watches, id, watch.on, watch.mode);
armed = true;
},
@@ -774,7 +774,7 @@ test "ordinary file watches still reconcile changes between open and watch" {
defer watchPane(fd, &watches, id, null, pane.serial, .{ .text = 0 });
var armed = false;
while (core.nextEffect()) |effect| switch (effect) {
- .watch => |watch| if (watch.pane == id and watch.on) {
+ .watch => |watch| if (watch.pane.index() == id and watch.on) {
try std.testing.expectEqual(.reconcile, watch.mode);
try std.testing.expect(!applyEffect(core, io, fd, &watches, id, watch.on, watch.mode));
armed = true;
@@ -949,7 +949,7 @@ test "a watched file deleted wakes the watch at once, and its pane says so" {
var watches: Table = @splat(null);
defer watchPane(fd, &watches, id, null, pane.serial, .{ .text = 0 });
while (core.nextEffect()) |effect| switch (effect) {
- .watch => |watch| if (watch.pane == id and watch.on) {
+ .watch => |watch| if (watch.pane.index() == id and watch.on) {
_ = applyEffect(core, io, fd, &watches, id, watch.on, watch.mode);
},
else => {},