From a8d58645240d68efdddc01d7bc25d84b29d5664e Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Thu, 15 Feb 2024 14:20:10 -0700 Subject: [PATCH] Fix panic when loading hover state. (#7861) Release Notes: - Fixed a panic when hovering over an identifier in the editor --- crates/editor/src/hover_popover.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/editor/src/hover_popover.rs b/crates/editor/src/hover_popover.rs index b4253e074b..8bed85305a 100644 --- a/crates/editor/src/hover_popover.rs +++ b/crates/editor/src/hover_popover.rs @@ -289,6 +289,7 @@ fn show_hover( })?; let hover_result = hover_request.await.ok().flatten(); + let snapshot = this.update(&mut cx, |this, cx| this.snapshot(cx))?; let hover_popover = match hover_result { Some(hover_result) if !hover_result.is_empty() => { // Create symbol range of anchors for highlighting and filtering of future requests.