aboutsummaryrefslogtreecommitdiff
path: root/helix-view
diff options
context:
space:
mode:
authorKirawi2021-06-05 03:49:19 +0000
committerGitHub2021-06-05 03:49:19 +0000
commitc17dcb8633550a4efde56ca5b4e2b00fbf9f45e1 (patch)
tree9ab71f76679c1735f275448768c091219e2d49c0 /helix-view
parent5a344a3ae508f571ad5427e14ffad683213bf142 (diff)
Fixing Multiple Panics (#121)
* init * wip * wip
Diffstat (limited to 'helix-view')
-rw-r--r--helix-view/src/view.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/helix-view/src/view.rs b/helix-view/src/view.rs
index b7bfaa17..8eccb9ef 100644
--- a/helix-view/src/view.rs
+++ b/helix-view/src/view.rs
@@ -106,7 +106,7 @@ impl View {
/// Calculates the last visible line on screen
#[inline]
pub fn last_line(&self, doc: &Document) -> usize {
- let height = self.area.height.saturating_sub(1); // - 1 for statusline
+ let height = self.area.height.saturating_sub(2); // - 2 for statusline
std::cmp::min(
self.first_line + height as usize,
doc.text().len_lines() - 1,