on master help sign in
fix: ui: Pin popups with no positioning to the initial cursor position
12ea388Blaž Hrastnik
helix-term/src/ui/popup.rs+1−2
@@ -110,8 +110,7 @@ impl<T: Component> Component for Popup<T> {
110
110
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());
115
114
116 let (width, height) = self.size;
115 let (width, height) = self.size;
117
116