summaryrefslogtreecommitdiff
path: root/src/File.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/File.zig')
-rw-r--r--src/File.zig3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/File.zig b/src/File.zig
index 0d62e09b..875d0f46 100644
--- a/src/File.zig
+++ b/src/File.zig
@@ -1538,6 +1538,9 @@ pub fn changed(p: *Pardes, id: u8, bytes: []const u8) void {
if (std.mem.eql(u8, f.content, bytes)) return;
if (f.saved_hash) |saved| if (f.revision != f.saved_revision and std.hash.Wyhash.hash(0, f.content) != saved) {
const disk = std.hash.Wyhash.hash(0, bytes);
+ // The disk holds what the text was read or saved as: no news, only
+ // a watch looking again (an undo back to this name, a restart).
+ if (disk == saved) return;
if (f.disk_newer == disk) return;
f.disk_newer = disk;
f.disk_newer_warned = false;