fix: ui: Pin popups with no positioning to the initial cursor position

This avoids the floating popup following the cursor as we type.
pull/624/head
Blaž Hrastnik 3 years ago
parent 466528c493
commit 12ea3888c5

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

Loading…
Cancel
Save