diff options
author | Diego | 2024-02-06 13:45:57 +0000 |
---|---|---|
committer | GitHub | 2024-02-06 13:45:57 +0000 |
commit | a37af2dcbf57b6b800946115b4156fefc199ce7a (patch) | |
tree | 9cb8f819eb2317cddaadac8dda6950aec2059bde | |
parent | 1d87c6a999d389011cf8a5849a6096d981c93e33 (diff) |
fix division by zero when prompt completion area is too small (#9524)
-rw-r--r-- | helix-term/src/ui/prompt.rs | 2 |
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"); |