diff --git a/examples/ide_completions.rs b/examples/ide_completions.rs index f6e69b7b..a209a167 100644 --- a/examples/ide_completions.rs +++ b/examples/ide_completions.rs @@ -33,7 +33,7 @@ fn main() -> io::Result<()> { // Max width of the completion box, including the border let max_completion_width: u16 = 50; // Max height of the completion box, including the border - let max_completion_height = u16::MAX; + let max_completion_height: u16 = u16::MAX; // Padding inside of the completion box (on the left and right side) let padding: u16 = 0; // Whether to draw the default border around the completion box diff --git a/src/menu/ide_menu.rs b/src/menu/ide_menu.rs index 2ce711f6..dc9cd821 100644 --- a/src/menu/ide_menu.rs +++ b/src/menu/ide_menu.rs @@ -818,7 +818,7 @@ impl Menu for IdeMenu { } fn menu_required_lines(&self, _terminal_columns: u16) -> u16 { - self.get_rows() + self.get_rows().min(self.default_details.max_completion_height) } fn menu_string(&self, available_lines: u16, use_ansi_coloring: bool) -> String {