Fix TUI details viewport scrolling

This commit is contained in:
Hermes Agent committed 2026-08-10 12:48:00 +00:00
1 parent cec1cc3500
commit e0ce21337d
6 files changed
+354 -53

No files matched your search

+9 -13
View File
@@ -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)
);
}