From b55e3c4b44e860853a154f0013211dd4942b7b6e Mon Sep 17 00:00:00 2001 From: Matt Paras Date: Thu, 19 Sep 2024 16:43:57 -0700 Subject: [PATCH] fix recent file picker empty space --- helix-term/src/commands/engine/steel.rs | 26 ++++++++++--------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/helix-term/src/commands/engine/steel.rs b/helix-term/src/commands/engine/steel.rs index d2c74f552..e0fbb6d26 100644 --- a/helix-term/src/commands/engine/steel.rs +++ b/helix-term/src/commands/engine/steel.rs @@ -2141,22 +2141,16 @@ fn configure_engine_impl(mut engine: Engine) -> Engine { )]; let cwd = helix_stdx::env::current_working_dir(); - let picker = ui::Picker::new( - columns, - 0, - [PathBuf::from("")], - cwd, - move |cx, path: &PathBuf, action| { - if let Err(e) = cx.editor.open(path, action) { - let err = if let Some(err) = e.source() { - format!("{}", err) - } else { - format!("unable to open \"{}\"", path.display()) - }; - cx.editor.set_error(err); - } - }, - ) + let picker = ui::Picker::new(columns, 0, [], cwd, move |cx, path: &PathBuf, action| { + if let Err(e) = cx.editor.open(path, action) { + let err = if let Some(err) = e.source() { + format!("{}", err) + } else { + format!("unable to open \"{}\"", path.display()) + }; + cx.editor.set_error(err); + } + }) .with_preview(|_editor, path| Some((PathOrId::Path(path.clone().into()), None))); let injector = picker.injector();