aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/ui/popup.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src/ui/popup.rs')
-rw-r--r--helix-term/src/ui/popup.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/helix-term/src/ui/popup.rs b/helix-term/src/ui/popup.rs
index 77ab2462..af8e53c5 100644
--- a/helix-term/src/ui/popup.rs
+++ b/helix-term/src/ui/popup.rs
@@ -1,9 +1,8 @@
use crate::{
commands::Open,
- compositor::{Callback, Component, Context, EventResult},
+ compositor::{Callback, Component, Context, Event, EventResult},
ctrl, key,
};
-use crossterm::event::Event;
use tui::buffer::Buffer as Surface;
use helix_core::Position;
@@ -149,7 +148,7 @@ impl<T: Component> Component for Popup<T> {
_ => return EventResult::Ignored(None),
};
- if key!(Esc) == key.into() && self.ignore_escape_key {
+ if key!(Esc) == key && self.ignore_escape_key {
return EventResult::Ignored(None);
}
@@ -158,7 +157,7 @@ impl<T: Component> Component for Popup<T> {
compositor.remove(self.id.as_ref());
});
- match key.into() {
+ match key {
// esc or ctrl-c aborts the completion and closes the menu
key!(Esc) | ctrl!('c') => {
let _ = self.contents.handle_event(event, cx);