aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--helix-term/src/ui/popup.rs3
1 files changed, 1 insertions, 2 deletions
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<T: Component> Component for Popup<T> {
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;