aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/ui/mod.rs
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-03-16 14:14:51 +0000
committerBlaž Hrastnik2021-03-16 14:14:51 +0000
commit51c15da3c32b2f0bf3da6db9bca9496d333ec15a (patch)
tree17f9bab081f0e9e58a967a62a73815a1fcf2acb3 /helix-term/src/ui/mod.rs
parent8dc0b18e35cdfdd76f435dcd43c1cfd5a3f0c7f7 (diff)
Hold a reference to executor on the Editor type.
Diffstat (limited to 'helix-term/src/ui/mod.rs')
-rw-r--r--helix-term/src/ui/mod.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/helix-term/src/ui/mod.rs b/helix-term/src/ui/mod.rs
index b175c646..f2376504 100644
--- a/helix-term/src/ui/mod.rs
+++ b/helix-term/src/ui/mod.rs
@@ -73,7 +73,7 @@ pub fn regex_prompt(
}
use std::path::{Path, PathBuf};
-pub fn file_picker(root: &str, ex: &'static smol::Executor) -> Picker<PathBuf> {
+pub fn file_picker(root: &str) -> Picker<PathBuf> {
use ignore::Walk;
// TODO: determine root based on git root
let files = Walk::new(root).filter_map(|entry| match entry {
@@ -98,7 +98,7 @@ pub fn file_picker(root: &str, ex: &'static smol::Executor) -> Picker<PathBuf> {
path.strip_prefix("./").unwrap().to_str().unwrap().into()
},
move |editor: &mut Editor, path: &PathBuf| {
- editor.open(path.into(), ex);
+ editor.open(path.into());
},
)
}