Get the number of lines to reserve for the completion menu.
(self)
| 279 | return output |
| 280 | |
| 281 | def get_reserved_space(self) -> int: |
| 282 | """Get the number of lines to reserve for the completion menu.""" |
| 283 | reserved_space_ratio = 0.45 |
| 284 | max_reserved_space = 8 |
| 285 | _, height = shutil.get_terminal_size() |
| 286 | return min(int(round(height * reserved_space_ratio)), max_reserved_space) |