mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-28 06:03:35 +03: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
@ -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 New Issue
Block a user