Skip to content

Commit

Permalink
feat: faster fast scrolling (shift/control/alt)
Browse files Browse the repository at this point in the history
  • Loading branch information
kabouzeid committed Apr 23, 2023
1 parent a919a82 commit 37e205a
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,23 +171,25 @@ impl App {
},
KeyCode::PageDown => {
self.job_stdout_offset = self.job_stdout_offset.saturating_sub(
if key
.modifiers
.contains(crossterm::event::KeyModifiers::CONTROL)
{
10
if key.modifiers.intersects(
crossterm::event::KeyModifiers::SHIFT
| crossterm::event::KeyModifiers::CONTROL
| crossterm::event::KeyModifiers::ALT,
) {
50
} else {
1
},
)
}
KeyCode::PageUp => {
self.job_stdout_offset = self.job_stdout_offset.saturating_add(
if key
.modifiers
.contains(crossterm::event::KeyModifiers::CONTROL)
{
10
if key.modifiers.intersects(
crossterm::event::KeyModifiers::SHIFT
| crossterm::event::KeyModifiers::CONTROL
| crossterm::event::KeyModifiers::ALT,
) {
50
} else {
1
},
Expand Down

0 comments on commit 37e205a

Please sign in to comment.