From 5b96a61d3b94e618626639698591570411b6f099 Mon Sep 17 00:00:00 2001 From: Diego Date: Tue, 6 Feb 2024 14:45:57 +0100 Subject: [PATCH] fix division by zero when prompt completion area is too small (#9524) --- helix-term/src/ui/prompt.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helix-term/src/ui/prompt.rs b/helix-term/src/ui/prompt.rs index 702a6e6714add..3764bba60c64d 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");