@@ -110,8 +110,7 @@ impl<T: Component> Component for Popup<T> {
111 let position = self
111 let position = self
112 .position
112 .position
113− .or_else(|| cx.editor.cursor().0)
114− .unwrap_or_default();
113+ .get_or_insert_with(|| cx.editor.cursor().0.unwrap_or_default());
116 let (width, height) = self.size;
115 let (width, height) = self.size;