aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/ui/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src/ui/mod.rs')
-rw-r--r--helix-term/src/ui/mod.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/helix-term/src/ui/mod.rs b/helix-term/src/ui/mod.rs
index 4daf82fc..5ef967b0 100644
--- a/helix-term/src/ui/mod.rs
+++ b/helix-term/src/ui/mod.rs
@@ -16,7 +16,7 @@ pub fn text_color() -> Style {
}
use std::path::{Path, PathBuf};
-pub fn file_picker(root: &str) -> Picker<PathBuf> {
+pub fn file_picker(root: &str, ex: &'static smol::Executor) -> Picker<PathBuf> {
use ignore::Walk;
// TODO: determine root based on git root
let files = Walk::new(root).filter_map(|entry| match entry {
@@ -40,9 +40,9 @@ pub fn file_picker(root: &str) -> Picker<PathBuf> {
// format_fn
path.strip_prefix("./").unwrap().to_str().unwrap().into()
},
- |editor: &mut Editor, path: &PathBuf| {
- let size = editor.view().unwrap().size;
- editor.open(path.into(), size);
+ move |editor: &mut Editor, path: &PathBuf| {
+ let size = editor.view().size;
+ editor.open(path.into(), size, ex);
},
)
}