From a37af2dcbf57b6b800946115b4156fefc199ce7a Mon Sep 17 00:00:00 2001 From: Diego Date: Tue, 6 Feb 2024 14:45:57 +0100 Subject: 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(-) (limited to 'helix-term/src/ui/prompt.rs') 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"); -- cgit v1.2.3-70-g09d2