mirror of
https://github.com/uutils/coreutils
synced 2024-12-17 16:43:16 +00:00
Simplified page down implementation
Signed-off-by: Hanif Bin Ariffin <hanif.ariffin.4326@gmail.com>
This commit is contained in:
parent
9ed5091be6
commit
083e745976
1 changed files with 1 additions and 4 deletions
|
@ -297,10 +297,7 @@ impl<'a> Pager<'a> {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn page_down(&mut self) {
|
fn page_down(&mut self) {
|
||||||
self.upper_mark = self
|
self.upper_mark = self.upper_mark.saturating_add(self.content_rows.into());
|
||||||
.upper_mark
|
|
||||||
.saturating_add(self.content_rows.into())
|
|
||||||
.min(self.line_count.saturating_sub(self.content_rows.into()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn page_up(&mut self) {
|
fn page_up(&mut self) {
|
||||||
|
|
Loading…
Reference in a new issue