File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1310,7 +1310,11 @@ def move_screen_up(current_line_start_row):
13101310 potential_space_below = min_height - current_line_end_row - 1
13111311 visible_space_below = potential_space_below - self .get_top_usable_line ()
13121312
1313- info_max_rows = max (visible_space_above , visible_space_below )
1313+ if self .config .curtsies_list_above :
1314+ info_max_rows = max (visible_space_above , visible_space_below )
1315+ else :
1316+ minimum_possible_height = 4
1317+ info_max_rows = max (visible_space_below , minimum_possible_height )
13141318 infobox = paint .paint_infobox (info_max_rows ,
13151319 int (width * self .config .cli_suggestion_width ),
13161320 self .matches_iter .matches ,
@@ -1324,8 +1328,6 @@ def move_screen_up(current_line_start_row):
13241328 else None )
13251329
13261330 if visible_space_below >= infobox .height or not self .config .curtsies_list_above :
1327- if visible_space_below < infobox .height :
1328- raise ValueError ('whoops %r %r' % (visible_space_below , infobox .height ))
13291331 arr [current_line_end_row + 1 :current_line_end_row + 1 + infobox .height , 0 :infobox .width ] = infobox
13301332 else :
13311333 arr [current_line_start_row - infobox .height :current_line_start_row , 0 :infobox .width ] = infobox
You can’t perform that action at this time.
0 commit comments