diff options
author | Blaž Hrastnik | 2021-02-09 06:59:42 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-02-09 06:59:42 +0000 |
commit | 5e73f83efa406a6989fff6077b90dd77a7328b36 (patch) | |
tree | 84c41b5ba0242244ed174a4c902d4ee50a116bfa /helix-view/src/editor.rs | |
parent | d4b85ce18d8a9bb535eaeae9e2c7421ef81c81e9 (diff) |
Implement vertical split calculations.
Diffstat (limited to 'helix-view/src/editor.rs')
-rw-r--r-- | helix-view/src/editor.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs index 2942507d..6b5b285d 100644 --- a/helix-view/src/editor.rs +++ b/helix-view/src/editor.rs @@ -15,10 +15,13 @@ pub struct Editor { } impl Editor { - pub fn new(area: tui::layout::Rect) -> Self { + pub fn new(mut area: tui::layout::Rect) -> Self { let theme = Theme::default(); let language_servers = helix_lsp::Registry::new(); + // HAXX: offset the render area height by 1 to account for prompt/commandline + area.height -= 1; + Self { tree: Tree::new(area), should_close: false, |