From 9ed5091be6bf4f0f9c13ec85a1b1ea9f72c4eccb Mon Sep 17 00:00:00 2001 From: Hanif Bin Ariffin Date: Sat, 12 Jun 2021 20:30:15 +0800 Subject: [PATCH] Fixed hanging with smaller content Using 'seq 10 | cargo run -- more' should no longer hangs. Signed-off-by: Hanif Bin Ariffin --- src/uu/more/src/more.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uu/more/src/more.rs b/src/uu/more/src/more.rs index 3724cd801..93a2f0edf 100644 --- a/src/uu/more/src/more.rs +++ b/src/uu/more/src/more.rs @@ -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) {