aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/commands.rs
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-03-16 14:05:43 +0000
committerBlaž Hrastnik2021-03-16 14:05:43 +0000
commite3ec5e31ec005e33da4c848b4272e81a6d21a5f0 (patch)
treea26c6025d45658b4d85d6917ea82489d6ba8fb2e /helix-term/src/commands.rs
parenteadad13efabb6a838a366b27002e09e1d2580750 (diff)
Fix goto code before merging.
Diffstat (limited to 'helix-term/src/commands.rs')
-rw-r--r--helix-term/src/commands.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs
index 45e8cd01..3e90fb63 100644
--- a/helix-term/src/commands.rs
+++ b/helix-term/src/commands.rs
@@ -15,8 +15,6 @@ use crate::ui::{self, Popup, Prompt, PromptEvent};
use std::path::PathBuf;
-use smol::Executor;
-
use helix_view::{
document::Mode,
view::{View, PADDING},
@@ -853,6 +851,7 @@ pub fn exit_select_mode(cx: &mut Context) {
}
fn goto(cx: &mut Context, locations: Vec<lsp::Location>) {
+ let executor = cx.executor;
let doc = cx.doc();
doc.mode = Mode::Normal;
@@ -876,7 +875,6 @@ fn goto(cx: &mut Context, locations: Vec<lsp::Location>) {
format!("{}:{}", file, line).into()
},
move |editor: &mut Editor, item| {
- let executor = smol::Executor::new();
editor.open(PathBuf::from(item.uri.path()), &executor);
let mut doc = &mut editor.view_mut().doc;
let definition_pos = item.range.start;