diff options
author | Blaž Hrastnik | 2021-03-16 14:14:51 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-03-16 14:14:51 +0000 |
commit | 51c15da3c32b2f0bf3da6db9bca9496d333ec15a (patch) | |
tree | 17f9bab081f0e9e58a967a62a73815a1fcf2acb3 /helix-term/src/ui | |
parent | 8dc0b18e35cdfdd76f435dcd43c1cfd5a3f0c7f7 (diff) |
Hold a reference to executor on the Editor type.
Diffstat (limited to 'helix-term/src/ui')
-rw-r--r-- | helix-term/src/ui/editor.rs | 1 | ||||
-rw-r--r-- | helix-term/src/ui/mod.rs | 4 |
2 files changed, 2 insertions, 3 deletions
diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs index eb951a26..b79b05e3 100644 --- a/helix-term/src/ui/editor.rs +++ b/helix-term/src/ui/editor.rs @@ -436,7 +436,6 @@ impl Component for EditorView { let mode = view.doc.mode(); let mut cxt = commands::Context { - executor: cx.executor, editor: &mut cx.editor, count: 1, callback: None, 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()); }, ) } |