From 1ce8682b94a54dc3297d67a147b4002bd44d6000 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Tue, 31 May 2022 11:22:41 +0200 Subject: [PATCH] Clear language server and worktree statuses when unsharing on server --- crates/collab/src/rpc/store.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/crates/collab/src/rpc/store.rs b/crates/collab/src/rpc/store.rs index fe9d21879e..78227999bc 100644 --- a/crates/collab/src/rpc/store.rs +++ b/crates/collab/src/rpc/store.rs @@ -550,6 +550,13 @@ impl Store { let connection_ids = project.connection_ids(); let unshare = connection_ids.len() <= 1 && project.join_requests.is_empty(); + if unshare { + project.language_servers.clear(); + for worktree in project.worktrees.values_mut() { + worktree.diagnostic_summaries.clear(); + worktree.entries.clear(); + } + } Ok(LeftProject { host_connection_id: project.host_connection_id,