Skip to content

Commit

Permalink
Use full screen size
Browse files Browse the repository at this point in the history
  • Loading branch information
vv9k committed Jun 20, 2021
1 parent 4b6b55c commit ac9dcb8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion helix-term/src/ui/completion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ impl Component for Completion {

let half = area.height / 2;
let height = 15.min(half);
let y = if cursor_pos > half as usize {
let y = if cursor_pos > (cx.editor.tree.full_area().y / 2) as usize {
0
} else {
// -2 to subtract command line + statusline. a bit of a hack, because of splits.
Expand Down
4 changes: 4 additions & 0 deletions helix-view/src/tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,10 @@ impl Tree {
self.focus = key;
}
}

pub fn full_area(&self) -> Rect {
self.area
}
}

#[derive(Debug)]
Expand Down

0 comments on commit ac9dcb8

Please sign in to comment.