Restructure RPC state to also keep track of remote worktrees on guests

This commit is contained in:
Antonio Scandurra
2021-06-28 15:35:36 +02:00
parent e72b4ae03d
commit 65aa9733d7
6 changed files with 133 additions and 40 deletions
+6
View File
@@ -1398,6 +1398,12 @@ impl Buffer {
self.operations.push(operation);
}
pub fn peer_left(&mut self, replica_id: ReplicaId, cx: &mut ModelContext<Self>) {
self.selections
.retain(|set_id, _| set_id.replica_id != replica_id);
cx.notify();
}
pub fn undo(&mut self, cx: &mut ModelContext<Self>) {
let was_dirty = self.is_dirty(cx.as_ref());
let old_version = self.version.clone();