mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-08-01 13:37:48 +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) {
|
||||
self.upper_mark = self
|
||||
.upper_mark
|
||||
.saturating_add(self.content_rows.into())
|
||||
.min(self.line_count.saturating_sub(self.content_rows.into()));
|
||||
self.upper_mark = self.upper_mark.saturating_add(self.content_rows.into());
|
||||
}
|
||||
|
||||
fn page_up(&mut self) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue