aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/ui/menu.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src/ui/menu.rs')
-rw-r--r--helix-term/src/ui/menu.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/helix-term/src/ui/menu.rs b/helix-term/src/ui/menu.rs
index 6bb64139..ce51ecbc 100644
--- a/helix-term/src/ui/menu.rs
+++ b/helix-term/src/ui/menu.rs
@@ -1,10 +1,9 @@
use std::{borrow::Cow, path::PathBuf};
use crate::{
- compositor::{Callback, Component, Compositor, Context, EventResult},
+ compositor::{Callback, Component, Compositor, Context, Event, EventResult},
ctrl, key, shift,
};
-use crossterm::event::Event;
use tui::{buffer::Buffer as Surface, text::Spans, widgets::Table};
pub use tui::widgets::{Cell, Row};
@@ -237,7 +236,7 @@ impl<T: Item + 'static> Component for Menu<T> {
compositor.pop();
}));
- match event.into() {
+ match event {
// esc or ctrl-c aborts the completion and closes the menu
key!(Esc) | ctrl!('c') => {
(self.callback_fn)(cx.editor, self.selection(), MenuEvent::Abort);