mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-28 11:29:25 +00:00
Forget buffered operations when resyncing with the host
Previously, we could end up with a situation where the host did not see an operation but a guest that didn't have that buffer open would. When such guest would finally open the buffer, they would apply the operation without however sending it to the host. The guest wouldn't bother resyncing it because it wasn't part of its open buffers.
This commit is contained in:
parent
61d048cb25
commit
12a286ac50
1 changed files with 2 additions and 0 deletions
|
@ -4725,6 +4725,8 @@ impl Project {
|
|||
}
|
||||
|
||||
if is_host {
|
||||
this.opened_buffers
|
||||
.retain(|_, buffer| !matches!(buffer, OpenBuffer::Operations(_)));
|
||||
this.buffer_changes_tx
|
||||
.unbounded_send(BufferMessage::Resync)
|
||||
.unwrap();
|
||||
|
|
Loading…
Reference in a new issue