Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-term/src/ui/prompt.rs')
| -rw-r--r-- | helix-term/src/ui/prompt.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/helix-term/src/ui/prompt.rs b/helix-term/src/ui/prompt.rs index 6ba2fcb9..1e443ce7 100644 --- a/helix-term/src/ui/prompt.rs +++ b/helix-term/src/ui/prompt.rs @@ -415,7 +415,8 @@ impl Prompt { let cols = std::cmp::max(1, area.width / max_len); let col_width = (area.width.saturating_sub(cols)) / cols; - let height = ((self.completion.len() as u16 + cols - 1) / cols) + let height = (self.completion.len() as u16) + .div_ceil(cols) .min(10) // at most 10 rows (or less) .min(area.height.saturating_sub(1)); |