Skip to content

Commit

Permalink
use Home and End keys to scroll process view (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexmaco committed Nov 9, 2020
1 parent b575697 commit 5e279de
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1423,6 +1423,14 @@ fn render_help(area: Rect, f: &mut Frame<'_, ZBackend>) {
Span::styled("PgUp ", key_style),
Span::styled(" Move view one screen up\n", main_style),
]),
Spans::from(vec![
Span::styled("Home ", key_style),
Span::styled(" Move to top\n", main_style),
]),
Spans::from(vec![
Span::styled("End ", key_style),
Span::styled(" Move to bottom\n", main_style),
]),
Spans::from(vec![
Span::styled("/ ", key_style),
Span::styled(" Change sort between ascending/descending\n", main_style),
Expand Down Expand Up @@ -1831,6 +1839,12 @@ impl<'a> TerminalRenderer {
process_table_height.into(),
process_table_height.into(),
),
Key::Home => self.view_up(process_table, process_table.len()),
Key::End => self.view_down(
process_table,
process_table_height.into(),
process_table.len(),
),
Key::Left => self.histogram_left(),
Key::Right => self.histogram_right(),
Key::Enter => {
Expand Down

0 comments on commit 5e279de

Please sign in to comment.