summaryrefslogtreecommitdiff
path: root/helix-term/src/ui/completion.rs
diff options
context:
space:
mode:
authorJan Hrastnik2021-06-19 12:51:53 +0000
committerJan Hrastnik2021-06-19 12:51:53 +0000
commitcdd9347457f0608346894cd0aab35b412cb59a7b (patch)
tree468078c37311cb1c7f9e7d4bd8a03c493d25e669 /helix-term/src/ui/completion.rs
parent97323dc2f90f81afc82bd929d111abda540bebe5 (diff)
parent2cbec2b0470d0759578929b224c445b69617b6b6 (diff)
Merge remote-tracking branch 'origin/master' into line_ending_detection
Diffstat (limited to 'helix-term/src/ui/completion.rs')
-rw-r--r--helix-term/src/ui/completion.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/helix-term/src/ui/completion.rs b/helix-term/src/ui/completion.rs
index 00ecce03..06ed966d 100644
--- a/helix-term/src/ui/completion.rs
+++ b/helix-term/src/ui/completion.rs
@@ -89,7 +89,7 @@ impl Completion {
// doc.state = snapshot.clone();
}
PromptEvent::Validate => {
- let (view, doc) = editor.current();
+ let (view, doc) = current!(editor);
// revert state to what it was before the last update
// doc.state = snapshot.clone();
@@ -169,7 +169,7 @@ impl Completion {
pub fn update(&mut self, cx: &mut commands::Context) {
// recompute menu based on matches
let menu = self.popup.contents_mut();
- let (view, doc) = cx.editor.current();
+ let (view, doc) = current!(cx.editor);
// cx.hooks()
// cx.add_hook(enum type, ||)
@@ -233,7 +233,7 @@ impl Component for Completion {
// ---
// option.documentation
- let (view, doc) = cx.editor.current();
+ let (view, doc) = current!(cx.editor);
let language = doc
.language()
.and_then(|scope| scope.strip_prefix("source."))