From c061698229ff6720d61b38a4fc5cb8935139a524 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Wed, 5 Nov 2025 09:30:22 +0100 Subject: [PATCH] project: Fetch latest lsp data in `deduplicate_range_based_lsp_requests` (#41971) Fixes ZED-2MK Release Notes: - Fixed a panic in inlay hints --- crates/project/src/lsp_store.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/crates/project/src/lsp_store.rs b/crates/project/src/lsp_store.rs index 90e987c379838ee89cb72136b234971c31ddbc77..9444f0f4d7bcde134690d4bab580a2432228d787 100644 --- a/crates/project/src/lsp_store.rs +++ b/crates/project/src/lsp_store.rs @@ -12349,10 +12349,7 @@ impl LspStore { .update(cx, |buffer, _| buffer.wait_for_version(version))? .await?; lsp_store.update(cx, |lsp_store, cx| { - let lsp_data = lsp_store - .lsp_data - .entry(buffer_id) - .or_insert_with(|| BufferLspData::new(&buffer, cx)); + let lsp_data = lsp_store.latest_lsp_data(&buffer, cx); let chunks_queried_for = lsp_data .inlay_hints .applicable_chunks(&[range])