Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Refresh window, bypassing view cache, when opening hover or context menu

Julia977832a04ea0
diff --git a/crates/editor/src/hover_popover.rs b/crates/editor/src/hover_popover.rs
index 8da2f50c198..609c20ac680 100644
--- a/crates/editor/src/hover_popover.rs
+++ b/crates/editor/src/hover_popover.rs
@@ -339,6 +339,7 @@ fn show_hover(
this.hover_state.info_popover = hover_popover;
cx.notify();
+ cx.refresh();
})?;
Ok::<_, anyhow::Error>(())
diff --git a/crates/ui/src/components/context_menu.rs b/crates/ui/src/components/context_menu.rs
index 5c4f110a415..4b683779997 100644
--- a/crates/ui/src/components/context_menu.rs
+++ b/crates/ui/src/components/context_menu.rs
@@ -51,6 +51,7 @@ impl ContextMenu {
let _on_blur_subscription = cx.on_blur(&focus_handle, |this: &mut ContextMenu, cx| {
this.cancel(&menu::Cancel, cx)
});
+ cx.refresh();
f(
Self {
items: Default::default(),