Fixed hanging with smaller content

Using 'seq 10 | cargo run -- more' should no longer hangs.

Signed-off-by: Hanif Bin Ariffin <hanif.ariffin.4326@gmail.com>
This commit is contained in:
Hanif Bin Ariffin 2021-06-12 20:30:15 +08:00
parent 28c6fad6e3
commit 9ed5091be6

View file

@ -293,7 +293,7 @@ impl<'a> Pager<'a> {
fn should_close(&mut self) -> bool {
self.upper_mark
.saturating_add(self.content_rows.into())
.eq(&self.line_count)
.ge(&self.line_count)
}
fn page_down(&mut self) {