Fix race conditions and bugs in Buffer::reload
This commit is contained in:
parent
89d73f713a
commit
5f1acae0d3
5 changed files with 123 additions and 44 deletions
|
@ -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);
|
||||
}
|
||||
})?;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue