Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Do not query for LSP tasks buffers that do not belong to the position given (#28536)
Kirill Bulatov804066a0471b
diff --git a/crates/editor/src/lsp_ext.rs b/crates/editor/src/lsp_ext.rsindex 84c7c7d5634..fb3158a7207 100644--- a/crates/editor/src/lsp_ext.rs+++ b/crates/editor/src/lsp_ext.rs@@ -85,6 +85,10 @@ pub fn lsp_tasks(.map(|(name, buffer_ids)| {let buffers = buffer_ids.iter()+ .filter(|&&buffer_id| match for_position {+ Some(for_position) => for_position.buffer_id == Some(buffer_id),+ None => true,+ }).filter_map(|&buffer_id| project.read(cx).buffer_for_id(buffer_id, cx)).collect::<Vec<_>>();language_server_for_buffers(project.clone(), name.clone(), buffers, cx)