summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorlroobrou <35152113+lroobrou@users.noreply.github.com>2022-10-20 06:34:00 +0200
committerGitHub <noreply@github.com>2022-10-20 00:34:00 -0400
commitee2f6c7a722f482611b1951bd84cf6bc44dea302 (patch)
treeef21c2389326b7d20a6b3730458ba4a0a5f0011a /src
parentb879c36588cd45ae382e152804e9421a5e8b9dd6 (diff)
feature: Implement PgUp and PgDown in the help dialog. (#841)
Diffstat (limited to 'src')
-rw-r--r--src/app.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/app.rs b/src/app.rs
index a78a20d2..e1b4e5fc 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -830,6 +830,10 @@ impl App {
0 => KillSignal::Cancel,
sig => KillSignal::Kill(sig),
};
+ } else if self.help_dialog_state.is_showing_help {
+ let current = &mut self.help_dialog_state.scroll_state.current_scroll_index;
+ let amount = self.help_dialog_state.height;
+ *current = current.saturating_sub(amount);
} else if self.current_widget.widget_type.is_widget_table() {
if let (Some((_tlc_x, tlc_y)), Some((_brc_x, brc_y))) = (
&self.current_widget.top_left_corner,
@@ -853,6 +857,11 @@ impl App {
new_signal += 2;
}
self.delete_dialog_state.selected_signal = KillSignal::Kill(new_signal);
+ } else if self.help_dialog_state.is_showing_help {
+ let current = self.help_dialog_state.scroll_state.current_scroll_index;
+ let amount = self.help_dialog_state.height;
+
+ self.help_scroll_to_or_max(current + amount);
} else if self.current_widget.widget_type.is_widget_table() {
if let (Some((_tlc_x, tlc_y)), Some((_brc_x, brc_y))) = (
&self.current_widget.top_left_corner,