diff options
author | Blaž Hrastnik | 2021-01-21 07:55:46 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-01-21 07:55:46 +0000 |
commit | 05c7fb98df43f7843d441e0dce3e5b361f2d7645 (patch) | |
tree | fef6ec32ba050d59538fa2d6ee8a7a64a36c4610 /helix-term/src/ui/mod.rs | |
parent | 15dd7ca6d863735db164456f78980a71fc8501a3 (diff) |
Refactoring: move language_servers into Editor, proper load for doc.
Diffstat (limited to 'helix-term/src/ui/mod.rs')
-rw-r--r-- | helix-term/src/ui/mod.rs | 8 |
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); }, ) } |