Maintain a set of peers as they join and leave the worktree

This commit is contained in:
Antonio Scandurra
2021-06-30 13:22:22 +02:00
parent ab089b6575
commit 7704291432
4 changed files with 98 additions and 13 deletions
+1 -1
View File
@@ -1494,7 +1494,7 @@ impl Buffer {
self.operations.push(operation);
}
pub fn peer_left(&mut self, replica_id: ReplicaId, cx: &mut ModelContext<Self>) {
pub fn remove_guest(&mut self, replica_id: ReplicaId, cx: &mut ModelContext<Self>) {
self.selections
.retain(|set_id, _| set_id.replica_id != replica_id);
cx.notify();