diff options
Diffstat (limited to 'dev/file_watch.zig')
| -rw-r--r-- | dev/file_watch.zig | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/dev/file_watch.zig b/dev/file_watch.zig index a0a500d7..d97e1d3d 100644 --- a/dev/file_watch.zig +++ b/dev/file_watch.zig @@ -471,7 +471,7 @@ pub fn reloadPane( } // The pane holds the disk's text already (a Zerox twin saved, its // other twin watching the same file): nothing reloaded, nothing said. - if (std.mem.eql(u8, file.content, bytes)) { + if (pardes.panes.File.fileEql(&file, bytes)) { if (watches[id]) |*live| if (live.serial == watched.serial) { live.generation = .{ .text = hash }; }; @@ -481,7 +481,7 @@ pub fn reloadPane( const current = core.panes[id] orelse return false; if (current.serial != watched.serial) return false; const current_file = current.file orelse return false; - if (!std.mem.eql(u8, current_file.content, bytes)) return false; + if (!pardes.panes.File.fileEql(¤t_file, bytes)) return false; if (watches[id]) |*live| { if (live.serial == watched.serial) live.generation = .{ .text = hash }; @@ -545,7 +545,7 @@ pub fn applyEffect( serial = pane.serial; if (pane.file) |file| { path = file.path; - generation = .{ .text = std.hash.Wyhash.hash(0, file.content) }; + generation = .{ .text = pardes.panes.File.fileHash(&file) }; } else if (kindPath(pane)) |kind_path| { path = kind_path; generation = .{ .kind = null }; |
