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 12:20:54 -04:00
parent 8fb8fff61b
commit e15f27106d
2 changed files with 13 additions and 0 deletions

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();
}
}