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
|
@ -110,8 +110,7 @@ fn render(&mut self, viewport: Rect, surface: &mut Surface, cx: &mut Context) {
|
|||
|
||||
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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue