summaryrefslogtreecommitdiff
path: root/helix-term/src/ui
diff options
context:
space:
mode:
authorwojciechkepka2021-06-20 10:35:12 +0000
committerBlaž Hrastnik2021-06-20 10:59:26 +0000
commitfc39a6c40df7d4a28994db762554815c37470073 (patch)
tree2e363ea61c061f42fa0eb85412aa41a08148aab8 /helix-term/src/ui
parent0882712b4598586ce7c9b8e8f446d6a6fc5ff060 (diff)
Add comment, statusline + commandline = 2
Diffstat (limited to 'helix-term/src/ui')
-rw-r--r--helix-term/src/ui/completion.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/helix-term/src/ui/completion.rs b/helix-term/src/ui/completion.rs
index 256d8f7d..80f7d590 100644
--- a/helix-term/src/ui/completion.rs
+++ b/helix-term/src/ui/completion.rs
@@ -292,8 +292,9 @@ impl Component for Completion {
let half = area.height / 2;
let height = 15.min(half);
+ // we want to make sure the cursor is visible (not hidden behind the documentation)
let y = if cursor_pos + view.area.y
- >= (cx.editor.tree.area().height - height - 1/* statusline */)
+ >= (cx.editor.tree.area().height - height - 2/* statusline + commandline */)
{
0
} else {