Skip to content

Commit

Permalink
fix ide menu not reporting correct required_lines
Browse files Browse the repository at this point in the history
  • Loading branch information
maxomatic458 committed Apr 14, 2024
1 parent 46f410b commit 883c48e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/ide_completions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/menu/ide_menu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,7 @@ impl Menu for IdeMenu {
}

Check warning on line 818 in src/menu/ide_menu.rs

View workflow job for this annotation

GitHub Actions / build-lint-test (ubuntu-latest, stable, bashisms)

Diff in /home/runner/work/reedline/reedline/src/menu/ide_menu.rs

Check warning on line 818 in src/menu/ide_menu.rs

View workflow job for this annotation

GitHub Actions / build-lint-test (ubuntu-latest, stable, default)

Diff in /home/runner/work/reedline/reedline/src/menu/ide_menu.rs

Check warning on line 818 in src/menu/ide_menu.rs

View workflow job for this annotation

GitHub Actions / build-lint-test (ubuntu-latest, stable, sqlite)

Diff in /home/runner/work/reedline/reedline/src/menu/ide_menu.rs

Check warning on line 818 in src/menu/ide_menu.rs

View workflow job for this annotation

GitHub Actions / build-lint-test (ubuntu-latest, stable, basqlite)

Diff in /home/runner/work/reedline/reedline/src/menu/ide_menu.rs

Check warning on line 818 in src/menu/ide_menu.rs

View workflow job for this annotation

GitHub Actions / build-lint-test (ubuntu-latest, stable, external_printer)

Diff in /home/runner/work/reedline/reedline/src/menu/ide_menu.rs

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 {
Expand Down

0 comments on commit 883c48e

Please sign in to comment.