Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

lsp: Fix workspace folders being cleared when new set is the same as the old one (#27242)

Piotr Osiewicz579868110b58
diff --git a/crates/lsp/src/lsp.rs b/crates/lsp/src/lsp.rs
index b4d97829209..f906b5dfaaf 100644
--- a/crates/lsp/src/lsp.rs
+++ b/crates/lsp/src/lsp.rs
@@ -1275,9 +1275,9 @@ impl LanguageServer {
name: String::default(),
})
.collect();
+ *workspace_folders = folders;
let should_notify = !added.is_empty() || !removed.is_empty();
if should_notify {
- *workspace_folders = folders;
drop(workspace_folders);
let params = DidChangeWorkspaceFoldersParams {
event: WorkspaceFoldersChangeEvent { added, removed },