File tree 1 file changed +13
-2
lines changed 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -1415,10 +1415,21 @@ def move_screen_up(current_line_start_row):
1415
1415
if self .config .curtsies_list_above :
1416
1416
info_max_rows = max (visible_space_above , visible_space_below )
1417
1417
else :
1418
+ # Logic for determining size of completion box
1418
1419
# smallest allowed over-full completion box
1419
- minimum_possible_height = 20
1420
+ minimum_possible_height = 4
1421
+ # smallest amount of history that must be visible
1422
+ try_preserve_history_height = 40
1423
+ preferred_height = max (
1424
+ # always make infobox at least this height
1425
+ minimum_possible_height ,
1426
+
1427
+ # there's so much space that we can preserve
1428
+ # this much history and still expand the infobox
1429
+ min_height - try_preserve_history_height )
1430
+
1420
1431
info_max_rows = min (max (visible_space_below ,
1421
- minimum_possible_height ),
1432
+ preferred_height ),
1422
1433
min_height - current_line_height - 1 )
1423
1434
infobox = paint .paint_infobox (
1424
1435
info_max_rows ,
You can’t perform that action at this time.
0 commit comments