diff options
author | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2020-04-05 21:35:36 +0300 |
---|---|---|
committer | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2020-04-05 21:35:36 +0300 |
commit | 18dcf15e1eb8b2b915016233b7185dd6ef36e1ef (patch) | |
tree | e5781c8206285a78a67082e82d7d532cecbcd47f /src | |
parent | d8135674dfb1f8ae22607ef7e41e5e33e39b3f61 (diff) |
Add open_mailbox shortcut for sidebar
Diffstat (limited to 'src')
-rw-r--r-- | src/components/mail/listing.rs | 7 | ||||
-rw-r--r-- | src/conf/shortcuts.rs | 1 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/components/mail/listing.rs b/src/components/mail/listing.rs index 99bc7a84..547abdda 100644 --- a/src/components/mail/listing.rs +++ b/src/components/mail/listing.rs @@ -843,7 +843,7 @@ impl Component for Listing { return true; } UIEvent::Input(ref k) - if shortcut!(k == shortcuts[CompactListing::DESCRIPTION]["open_thread"]) => + if shortcut!(k == shortcuts[Listing::DESCRIPTION]["open_mailbox"]) => { self.cursor_pos = self.menu_cursor_pos; self.change_account(context); @@ -1058,7 +1058,10 @@ impl Component for Listing { fn get_shortcuts(&self, context: &Context) -> ShortcutMaps { let mut map = self.component.get_shortcuts(context); - let config_map = context.settings.shortcuts.listing.key_values(); + let mut config_map = context.settings.shortcuts.listing.key_values(); + if self.focus != ListingFocus::Menu { + config_map.remove("open_mailbox"); + } map.insert(Listing::DESCRIPTION, config_map); map diff --git a/src/conf/shortcuts.rs b/src/conf/shortcuts.rs index 03b6eb7d..dec44c39 100644 --- a/src/conf/shortcuts.rs +++ b/src/conf/shortcuts.rs @@ -132,6 +132,7 @@ shortcut_key_values! { "listing", next_page |> "Go to next page." |> Key::PageDown, prev_account |> "Go to previous account." |> Key::Char('l'), prev_mailbox |> "Go to previous mailbox." |> Key::Char('K'), + open_mailbox |> "Open selected mailbox" |> Key::Char('\n'), prev_page |> "Go to previous page." |> Key::PageUp, search |> "Search within list of e-mails." |> Key::Char('/'), refresh |> "Manually request a mailbox refresh." |> Key::F(5), |