From d545fe9fe4645a921870fd9d9867a30c9d174b97 Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Tue, 27 Feb 2024 16:04:30 -0700 Subject: [PATCH] Add missing wait_for_anchors (#8509) Release Notes: - Fixed a panic when hovering in a collaboration session --- crates/project/src/lsp_command.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/crates/project/src/lsp_command.rs b/crates/project/src/lsp_command.rs index 9e432c1eac..59e958d082 100644 --- a/crates/project/src/lsp_command.rs +++ b/crates/project/src/lsp_command.rs @@ -1405,6 +1405,13 @@ impl LspCommand for GetHover { } else { None }; + if let Some(range) = range.as_ref() { + buffer + .update(&mut cx, |buffer, _| { + buffer.wait_for_anchors([range.start.clone(), range.end.clone()]) + })? + .await?; + } Ok(Some(Hover { contents,