diff options
author | Dmitry Sharshakov | 2021-08-25 16:22:01 +0000 |
---|---|---|
committer | Dmitry Sharshakov | 2021-08-25 16:22:01 +0000 |
commit | c7759a5aa0b5381e0a71ba58f3f7a5f7d98c9777 (patch) | |
tree | 66fe309913b5d7fad40e21def56b724cabc61127 /helix-view/src/view.rs | |
parent | 4ee66b876613c3d2c06945520e0c5e392d9315d1 (diff) | |
parent | 44a0512d951806cc98ab30ccc73009ba2631e42f (diff) |
Merge remote-tracking branch 'origin/master' into debug
Diffstat (limited to 'helix-view/src/view.rs')
-rw-r--r-- | helix-view/src/view.rs | 7 |
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) { |