diff options
author | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2019-07-12 12:38:47 +0300 |
---|---|---|
committer | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2019-07-13 22:52:42 +0300 |
commit | 0925f2a439c4bf5a0d17d8e01d56fdcdc57116d5 (patch) | |
tree | a4566cdda01d198ba7ab21b30996a93ed21acb82 /ui | |
parent | 8ab79d5829863a8ffb1a27eb0ebb67f7e5f40241 (diff) |
ui: restore Page{Up,Dn} to Pager
When issuing PageUp and PageDn actions to an e-mail pager in
CompactListing, the input action was handled by listing and not the
pager which led to the keys get seemingly ignored.
Diffstat (limited to 'ui')
-rw-r--r-- | ui/src/components/utilities.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ui/src/components/utilities.rs b/ui/src/components/utilities.rs index d538a3a3..cca21c6a 100644 --- a/ui/src/components/utilities.rs +++ b/ui/src/components/utilities.rs @@ -499,29 +499,31 @@ impl Component for Pager { self.cursor_pos -= 1; self.dirty = true; } + return true; } UIEvent::Input(ref key) if *key == shortcuts["scroll_down"] => { if self.height > 0 && self.cursor_pos + 1 < self.height { self.cursor_pos += 1; self.dirty = true; } + return true; } UIEvent::Input(ref key) if *key == shortcuts["page_up"] => { self.movement = Some(PageMovement::PageUp); self.dirty = true; + return true; } UIEvent::Input(ref key) if *key == shortcuts["page_down"] => { self.movement = Some(PageMovement::PageDown); self.dirty = true; + return true; } UIEvent::ChangeMode(UIMode::Normal) => { self.dirty = true; - return false; } UIEvent::Resize => { self.dirty = true; self.max_cursor_pos = None; - return false; } _ => {} } |