diff options
author | Jan Hrastnik | 2020-10-10 17:54:16 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2020-10-16 02:59:09 +0000 |
commit | 7208c86f23ac6d75aff62268cff73089c068cf74 (patch) | |
tree | 96b5708017062e32d1f54981ce76d97538822d89 /helix-view/src | |
parent | c60f1a655333f41460e21a2e193734864f43211c (diff) |
separated statusline and prompt
Diffstat (limited to 'helix-view/src')
-rw-r--r-- | helix-view/src/view.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/helix-view/src/view.rs b/helix-view/src/view.rs index 44f7576f..2b68dbc3 100644 --- a/helix-view/src/view.rs +++ b/helix-view/src/view.rs @@ -39,7 +39,7 @@ impl View { pub fn ensure_cursor_in_view(&mut self) { let cursor = self.state.selection().cursor(); let line = self.state.doc().char_to_line(cursor); - let document_end = self.first_line + (self.size.1 as usize).saturating_sub(1); + let document_end = self.first_line + (self.size.1 as usize).saturating_sub(2); // TODO: side scroll @@ -55,7 +55,7 @@ impl View { /// Calculates the last visible line on screen #[inline] pub fn last_line(&self) -> usize { - let viewport = Rect::new(6, 0, self.size.0, self.size.1 - 1); // - 1 for statusline + let viewport = Rect::new(6, 0, self.size.0, self.size.1 - 2); // - 2 for statusline and prompt std::cmp::min( self.first_line + (viewport.height as usize), self.state.doc().len_lines() - 1, |