1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

Merge pull request #4873 from cakebaker/more_page_down_page_up

more: support PageDown/PageUp keys
This commit is contained in:
Sylvestre Ledru 2023-05-18 18:24:19 +02:00 committed by GitHub
commit fdf8ce548a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -257,6 +257,11 @@ fn more(buff: &str, stdout: &mut Stdout, next_file: Option<&str>, silent: bool)
modifiers: KeyModifiers::NONE,
..
})
| Event::Key(KeyEvent {
code: KeyCode::PageDown,
modifiers: KeyModifiers::NONE,
..
})
| Event::Key(KeyEvent {
code: KeyCode::Char(' '),
modifiers: KeyModifiers::NONE,
@ -272,6 +277,11 @@ fn more(buff: &str, stdout: &mut Stdout, next_file: Option<&str>, silent: bool)
code: KeyCode::Up,
modifiers: KeyModifiers::NONE,
..
})
| Event::Key(KeyEvent {
code: KeyCode::PageUp,
modifiers: KeyModifiers::NONE,
..
}) => {
pager.page_up();
}