Skip to content

Commit 8df9158

Browse files
committed
feat: fast scroll
1 parent d42f79a commit 8df9158

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

src/app.rs

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,10 +115,28 @@ impl App {
115115
Focus::Jobs => self.select_next_job(),
116116
},
117117
KeyCode::PageDown => {
118-
self.job_stdout_offset = self.job_stdout_offset.saturating_sub(1)
118+
self.job_stdout_offset = self.job_stdout_offset.saturating_sub(
119+
if key
120+
.modifiers
121+
.contains(crossterm::event::KeyModifiers::CONTROL)
122+
{
123+
10
124+
} else {
125+
1
126+
},
127+
)
119128
}
120129
KeyCode::PageUp => {
121-
self.job_stdout_offset = self.job_stdout_offset.saturating_add(1)
130+
self.job_stdout_offset = self.job_stdout_offset.saturating_add(
131+
if key
132+
.modifiers
133+
.contains(crossterm::event::KeyModifiers::CONTROL)
134+
{
135+
10
136+
} else {
137+
1
138+
},
139+
)
122140
}
123141
_ => {}
124142
};

0 commit comments

Comments
 (0)