aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src/view.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-view/src/view.rs')
-rw-r--r--helix-view/src/view.rs7
1 files changed, 1 insertions, 6 deletions
diff --git a/helix-view/src/view.rs b/helix-view/src/view.rs
index b707c092..01f18c71 100644
--- a/helix-view/src/view.rs
+++ b/helix-view/src/view.rs
@@ -83,12 +83,7 @@ impl View {
pub fn inner_area(&self) -> Rect {
// TODO: not ideal
const OFFSET: u16 = 7; // 1 diagnostic + 5 linenr + 1 gutter
- Rect::new(
- self.area.x + OFFSET,
- self.area.y,
- self.area.width - OFFSET,
- self.area.height.saturating_sub(1), // -1 for statusline
- )
+ self.area.clip_left(OFFSET).clip_bottom(1) // -1 for statusline
}
pub fn ensure_cursor_in_view(&mut self, doc: &Document, scrolloff: usize) {