diff options
author | Blaž Hrastnik | 2021-11-07 09:03:04 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-11-07 09:03:04 +0000 |
commit | 3b8d5102acfcd2aeacb7d8c88eaaf51f5be0cc7b (patch) | |
tree | b03dcfd930b045dd18a00e3b9d9086ec045eb808 /helix-term/src/ui/mod.rs | |
parent | 64bb1f75639136868d762b79daa9cc659bf601d0 (diff) |
Make picker take the whole context, not just editor
Diffstat (limited to 'helix-term/src/ui/mod.rs')
-rw-r--r-- | helix-term/src/ui/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/helix-term/src/ui/mod.rs b/helix-term/src/ui/mod.rs index 00c70cea..d634bc4a 100644 --- a/helix-term/src/ui/mod.rs +++ b/helix-term/src/ui/mod.rs @@ -21,7 +21,7 @@ pub use text::Text; use helix_core::regex::Regex; use helix_core::regex::RegexBuilder; -use helix_view::{Document, Editor, View}; +use helix_view::{Document, View}; use std::path::PathBuf; @@ -151,8 +151,8 @@ pub fn file_picker(root: PathBuf) -> FilePicker<PathBuf> { .unwrap() .into() }, - move |editor: &mut Editor, path: &PathBuf, action| { - editor + move |cx, path: &PathBuf, action| { + cx.editor .open(path.into(), action) .expect("editor.open failed"); }, |