diff options
Diffstat (limited to 'src/modes/display/content_window.rs')
-rw-r--r-- | src/modes/display/content_window.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modes/display/content_window.rs b/src/modes/display/content_window.rs index 97d6f04..4e1603c 100644 --- a/src/modes/display/content_window.rs +++ b/src/modes/display/content_window.rs @@ -41,7 +41,7 @@ impl ContentWindow { /// Default value for the bottom index. /// minimum of terminal height minus reserved rows and the length of the content. fn default_bottom(len: usize, height: usize) -> usize { - min(height - Self::BOTTOM_ROWS, len) + min(height.saturating_sub(Self::BOTTOM_ROWS), len) } /// Returns a new `ContentWindow` instance with values depending of |