aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src
diff options
context:
space:
mode:
authorDiego2024-02-06 13:45:57 +0000
committerGitHub2024-02-06 13:45:57 +0000
commita37af2dcbf57b6b800946115b4156fefc199ce7a (patch)
tree9cb8f819eb2317cddaadac8dda6950aec2059bde /helix-term/src
parent1d87c6a999d389011cf8a5849a6096d981c93e33 (diff)
fix division by zero when prompt completion area is too small (#9524)
Diffstat (limited to 'helix-term/src')
-rw-r--r--helix-term/src/ui/prompt.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/helix-term/src/ui/prompt.rs b/helix-term/src/ui/prompt.rs
index 702a6e67..3764bba6 100644
--- a/helix-term/src/ui/prompt.rs
+++ b/helix-term/src/ui/prompt.rs
@@ -393,7 +393,7 @@ impl Prompt {
height,
);
- if !self.completion.is_empty() {
+ if completion_area.height > 0 && !self.completion.is_empty() {
let area = completion_area;
let background = theme.get("ui.menu");