diff options
Diffstat (limited to 'core/File.zig')
| -rw-r--r-- | core/File.zig | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/File.zig b/core/File.zig index 8337b833..c336b1b8 100644 --- a/core/File.zig +++ b/core/File.zig @@ -581,13 +581,13 @@ pub fn open(p: *Pardes, id: usize, path: []const u8, line: usize) !*Pane { pane.body.cur_pinned = true; pane.body.cur_row = @intCast(scroll); p.installPane(id, pane); - if (filesystem.localPath(path) != null) p.emit(.{ .watch = .{ .pane = @intCast(id), .on = true } }); + if (filesystem.localPath(path) != null) p.emit(.{ .watch = .{ .pane = .at(id), .on = true } }); return pane; } pub fn deinit(p: *Pardes, pane: *Pane, file: *State) void { if (file.output == null) for (p.panes, 0..) |slot, id| { - if (slot == pane) p.emit(.{ .watch = .{ .pane = @intCast(id), .on = false } }); + if (slot == pane) p.emit(.{ .watch = .{ .pane = .at(id), .on = false } }); }; // A twin's text, undo and shared index stay with the twins left. var twins: [pardes.MAX_PANES]usize = undefined; @@ -991,7 +991,7 @@ pub fn zerox(p: *Pardes, from: usize, to: usize) !*Pane { pane.body.cur_row = src.body.cur_row; pane.body.cur_col = src.body.cur_col; pane.body.cur_pinned = true; - if (filesystem.localPath(path) != null) p.emit(.{ .watch = .{ .pane = @intCast(to), .on = true } }); + if (filesystem.localPath(path) != null) p.emit(.{ .watch = .{ .pane = .at(to), .on = true } }); return pane; } @@ -1296,7 +1296,7 @@ fn restoreName(p: *Pardes, pane: *Pane, f: *State, snap: Text.Place) void { f.saved_revision = if (snap.clean) f.revision else f.revision -% 1; f.disk_newer = null; f.disk_newer_warned = false; - if (filesystem.localPath(path) != null) p.emit(.{ .watch = .{ .pane = @intCast(id), .on = true } }); + if (filesystem.localPath(path) != null) p.emit(.{ .watch = .{ .pane = .at(id), .on = true } }); } pub fn restoreSnap(tab: u16, pane: *Pane, f: *State, snap: Text.Place) void { |
