ui/listing: add search shortcut

embed
Manos Pitsidianakis 2019-10-12 17:52:18 +03:00
parent b075501ef7
commit 271cae025b
Signed by: Manos Pitsidianakis
GPG Key ID: 73627C2F690DF710
1 changed files with 9 additions and 0 deletions

View File

@ -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 {