Skip to content

Commit bf75a6d

Browse files
committed
Replace set_position with position
1 parent 116baa3 commit bf75a6d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

helix-term/src/ui/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,13 +129,13 @@ pub fn regex_prompt(
129129
let call: job::Callback = Box::new(
130130
move |_editor: &mut Editor, compositor: &mut Compositor| {
131131
let contents = Text::new(format!("{}", err));
132-
let mut popup = Popup::new("invalid-regex", contents);
133132
let size = compositor.size();
133+
let mut popup = Popup::new("invalid-regex", contents)
134+
.position(Some(helix_core::Position::new(
135+
size.height as usize - 2, // 2 = statusline + commandline
136+
0,
137+
)));
134138
popup.required_size((size.width, size.height));
135-
popup.set_position(Some(helix_core::Position::new(
136-
size.height as usize - 2, // 2 = statusline + commandline
137-
0,
138-
)));
139139

140140
compositor.replace_or_push("invalid-regex", popup);
141141
},

0 commit comments

Comments
 (0)