From 579868110b5845b46b92e43b5319acc88a1164bf Mon Sep 17 00:00:00 2001 From: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Date: Fri, 21 Mar 2025 14:47:06 +0100 Subject: [PATCH] lsp: Fix workspace folders being cleared when new set is the same as the old one (#27242) Release Notes: - N/A --- crates/lsp/src/lsp.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/lsp/src/lsp.rs b/crates/lsp/src/lsp.rs index b4d9782920..f906b5dfaa 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 },