fix: ui: Pin popups with no positioning to the initial cursor position
This avoids the floating popup following the cursor as we type.
This commit is contained in:
parent
466528c493
commit
12ea3888c5
1 changed files with 1 additions and 2 deletions
|
@ -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…
Reference in a new issue