diff options
Diffstat (limited to 'helix-term/src/ui/editor.rs')
-rw-r--r-- | helix-term/src/ui/editor.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs index 496edf42..ffe755e6 100644 --- a/helix-term/src/ui/editor.rs +++ b/helix-term/src/ui/editor.rs @@ -699,7 +699,8 @@ impl Component for EditorView { match event { Event::Resize(width, height) => { // HAXX: offset the render area height by 1 to account for prompt/commandline - cx.editor.resize(Rect::new(0, 0, width, height - 1)); + cx.editor + .resize(Rect::new(0, 0, width, height.saturating_sub(1))); EventResult::Consumed(None) } Event::Key(key) => { |