Fix TUI details viewport scrolling
This commit is contained in:
1 parent
cec1cc3500
commit
e0ce21337d
6 files changed
+354
-53
No files matched your search
+9
-13
@@ -272,7 +272,7 @@ pub static ACTIONS: &[ActionSpec] = &[
|
||||
(KeyCode::Char('j'), KeyModifiers::NONE, "j"),
|
||||
(KeyCode::Down, KeyModifiers::NONE, "↓"),
|
||||
),
|
||||
modes: &[Mode::Browser],
|
||||
modes: BROWSER_LIKE,
|
||||
},
|
||||
ActionSpec {
|
||||
action: Action::Previous,
|
||||
@@ -282,7 +282,7 @@ pub static ACTIONS: &[ActionSpec] = &[
|
||||
(KeyCode::Char('k'), KeyModifiers::NONE, "k"),
|
||||
(KeyCode::Up, KeyModifiers::NONE, "↑"),
|
||||
),
|
||||
modes: &[Mode::Browser],
|
||||
modes: BROWSER_LIKE,
|
||||
},
|
||||
ActionSpec {
|
||||
action: Action::PageDown,
|
||||
@@ -399,22 +399,14 @@ pub static ACTIONS: &[ActionSpec] = &[
|
||||
action: Action::ScrollDown,
|
||||
label: "scroll down",
|
||||
command: "scroll-down",
|
||||
bindings: keys!(
|
||||
(KeyCode::Char('j'), KeyModifiers::NONE, "j"),
|
||||
(KeyCode::Down, KeyModifiers::NONE, "↓"),
|
||||
(KeyCode::PageDown, KeyModifiers::NONE, "PgDn"),
|
||||
),
|
||||
bindings: keys!((KeyCode::PageDown, KeyModifiers::NONE, "PgDn")),
|
||||
modes: &[Mode::Viewer],
|
||||
},
|
||||
ActionSpec {
|
||||
action: Action::ScrollUp,
|
||||
label: "scroll up",
|
||||
command: "scroll-up",
|
||||
bindings: keys!(
|
||||
(KeyCode::Char('k'), KeyModifiers::NONE, "k"),
|
||||
(KeyCode::Up, KeyModifiers::NONE, "↑"),
|
||||
(KeyCode::PageUp, KeyModifiers::NONE, "PgUp"),
|
||||
),
|
||||
bindings: keys!((KeyCode::PageUp, KeyModifiers::NONE, "PgUp")),
|
||||
modes: &[Mode::Viewer],
|
||||
},
|
||||
ActionSpec {
|
||||
@@ -851,7 +843,11 @@ mod tests {
|
||||
);
|
||||
assert_eq!(
|
||||
resolver.feed(Mode::Viewer, KeyCode::Down, KeyModifiers::NONE),
|
||||
KeyResolution::Action(Action::ScrollDown)
|
||||
KeyResolution::Action(Action::Next)
|
||||
);
|
||||
assert_eq!(
|
||||
resolver.feed(Mode::Viewer, KeyCode::Char('k'), KeyModifiers::NONE),
|
||||
KeyResolution::Action(Action::Previous)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user