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

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz
2025-03-21 13:47:06 +00:00
committed by GitHub
parent a709d4c7c6
commit 579868110b
+1 -1
View File
@@ -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 },