From 271cae025baedbde97ad8e522a74aa5a7be475e1 Mon Sep 17 00:00:00 2001 From: Manos Pitsidianakis Date: Sat, 12 Oct 2019 17:52:18 +0300 Subject: [PATCH] ui/listing: add search shortcut --- ui/src/components/mail/listing.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ui/src/components/mail/listing.rs b/ui/src/components/mail/listing.rs index b95161ff7..7fa837c61 100644 --- a/ui/src/components/mail/listing.rs +++ b/ui/src/components/mail/listing.rs @@ -427,6 +427,15 @@ impl Component for Listing { .push_back(UIEvent::Action(Tab(NewDraft(self.cursor_pos.0, None)))); return true; } + UIEvent::Input(ref key) if *key == shortcuts["search"] => { + context + .replies + .push_back(UIEvent::ExInput(Key::Paste("filter ".to_string()))); + context + .replies + .push_back(UIEvent::ChangeMode(UIMode::Execute)); + return true; + } UIEvent::Input(ref key) if *key == shortcuts["set_seen"] => { let mut event = UIEvent::Action(Action::Listing(ListingAction::SetSeen)); if match self.component {