diff --git a/helix-term/src/ui/mod.rs b/helix-term/src/ui/mod.rs index 909a99424daa5..89cbdfcb5e209 100644 --- a/helix-term/src/ui/mod.rs +++ b/helix-term/src/ui/mod.rs @@ -180,7 +180,11 @@ pub fn file_picker(root: PathBuf, config: &helix_view::editor::Config) -> FilePi path.strip_prefix(&root).unwrap_or(path).to_string_lossy() }, move |cx, path: &PathBuf, action| { - cx.editor.open(path, action).expect("editor.open failed"); + if let Err(err) = cx.editor.open(path, action) { + let err = format!("{}", err); + log::error!("{}", err); + cx.editor.set_error(err); + } }, |_editor, path| Some((path.clone(), None)), )