Reset buffer git diff when setting diff base to None

Co-Authored-By: Joseph Lyons <joseph@zed.dev>
This commit is contained in:
Julia
2022-10-07 15:37:37 -04:00
co-authored by Joseph Lyons
parent 8fb8fff61b
commit e15f27106d
2 changed files with 13 additions and 0 deletions
+5
View File
@@ -707,6 +707,11 @@ impl Buffer {
}
})
.detach()
} else {
let snapshot = self.snapshot();
self.git_diff_status.diff.clear(&snapshot);
self.git_diff_update_count += 1;
cx.notify();
}
}