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:
Antonio Scandurra 2023-04-12 09:30:34 +02:00
parent 61d048cb25
commit 12a286ac50

View File

@ -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();