diff --git a/helix-term/src/ui/popup.rs b/helix-term/src/ui/popup.rs index e31d4d7b..e126c845 100644 --- a/helix-term/src/ui/popup.rs +++ b/helix-term/src/ui/popup.rs @@ -110,8 +110,7 @@ impl Component for Popup { let position = self .position - .or_else(|| cx.editor.cursor().0) - .unwrap_or_default(); + .get_or_insert_with(|| cx.editor.cursor().0.unwrap_or_default()); let (width, height) = self.size;