mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-12 21:32:40 +00:00
Send buffer operations in the order they occur
Co-Authored-By: Nathan Sobo <nathan@zed.dev> Co-Authored-By: Max Brunsfeld <max@zed.dev>
This commit is contained in:
parent
ad3dcfed10
commit
b7fae693f9
1 changed files with 13 additions and 14 deletions
|
@ -1748,20 +1748,19 @@ impl File {
|
|||
Worktree::Local(worktree) => worktree.rpc.clone(),
|
||||
Worktree::Remote(worktree) => Some((worktree.rpc.clone(), worktree.remote_id)),
|
||||
} {
|
||||
cx.background()
|
||||
.spawn(async move {
|
||||
if let Err(error) = rpc
|
||||
.send(proto::UpdateBuffer {
|
||||
worktree_id: remote_id,
|
||||
buffer_id,
|
||||
operations: Some(operation).iter().map(Into::into).collect(),
|
||||
})
|
||||
.await
|
||||
{
|
||||
log::error!("error sending buffer operation: {}", error);
|
||||
}
|
||||
})
|
||||
.detach();
|
||||
cx.spawn(|_, _| async move {
|
||||
if let Err(error) = rpc
|
||||
.send(proto::UpdateBuffer {
|
||||
worktree_id: remote_id,
|
||||
buffer_id,
|
||||
operations: Some(operation).iter().map(Into::into).collect(),
|
||||
})
|
||||
.await
|
||||
{
|
||||
log::error!("error sending buffer operation: {}", error);
|
||||
}
|
||||
})
|
||||
.detach();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue