Fix race conditions and bugs in Buffer::reload

This commit is contained in:
Max Brunsfeld 2023-11-16 15:52:24 -08:00
parent 89d73f713a
commit 5f1acae0d3
5 changed files with 123 additions and 44 deletions

View file

@ -276,6 +276,7 @@ struct ShareState {
_maintain_remote_snapshot: Task<Option<()>>,
}
#[derive(Clone)]
pub enum Event {
UpdatedEntries(UpdatedEntriesSet),
UpdatedGitRepositories(UpdatedGitRepositoriesSet),
@ -961,7 +962,7 @@ impl LocalWorktree {
buffer_handle.update(&mut cx, |buffer, cx| {
if has_changed_file {
buffer.file_updated(new_file, cx).detach();
buffer.file_updated(new_file, cx);
}
})?;
}