summaryrefslogtreecommitdiff
path: root/src/file_pane.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/file_pane.zig')
-rw-r--r--src/file_pane.zig3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/file_pane.zig b/src/file_pane.zig
index 68fea40f..739d7b54 100644
--- a/src/file_pane.zig
+++ b/src/file_pane.zig
@@ -33,6 +33,9 @@ pub fn open(p: *Pardes, id: usize, path: []const u8, line: usize) !*Pane {
pane.file = .{ .path = path_copy, .content = content, .scroll = scroll };
pane.cur_pinned = true;
pane.cur_row = @intCast(scroll);
+ // watches follow pane lifetime: this is the only place a real file is read
+ // off disk, and deinitPane is the only place one goes away
+ p.emit(.{ .watch = .{ .pane = @intCast(id), .on = true } });
return pane;
}