From 15f9a5d309cd6ba242fe978105328edd17a09483 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 702a6e6714ad..3764bba60c64 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");