summaryrefslogtreecommitdiffstats
path: root/src/interactive/app/handlers.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/interactive/app/handlers.rs')
-rw-r--r--src/interactive/app/handlers.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/interactive/app/handlers.rs b/src/interactive/app/handlers.rs
index e940997..2360aae 100644
--- a/src/interactive/app/handlers.rs
+++ b/src/interactive/app/handlers.rs
@@ -29,12 +29,16 @@ pub enum CursorDirection {
Down,
Up,
PageUp,
+ ToTop,
+ ToBottom,
}
impl CursorDirection {
pub fn move_cursor(&self, n: usize) -> usize {
use CursorDirection::*;
match self {
+ ToTop => 0,
+ ToBottom => usize::MAX,
Down => n.saturating_add(1),
Up => n.saturating_sub(1),
PageDown => n.saturating_add(10),
@@ -202,7 +206,7 @@ impl AppState {
) where
B: Backend,
{
- let res = window.mark_pane.take().and_then(|p| p.key(key));
+ let res = window.mark_pane.take().and_then(|p| p.process_events(key));
window.mark_pane = match res {
Some((pane, mode)) => match mode {
Some(MarkMode::Delete) => {