File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -1221,7 +1221,11 @@ def move_screen_up(current_line_start_row):
1221
1221
potential_space_below = min_height - current_line_end_row - 1
1222
1222
visible_space_below = potential_space_below - self .get_top_usable_line ()
1223
1223
1224
- info_max_rows = max (visible_space_above , visible_space_below )
1224
+ if self .config .curtsies_list_above :
1225
+ info_max_rows = max (visible_space_above , visible_space_below )
1226
+ else :
1227
+ minimum_possible_height = 4
1228
+ info_max_rows = max (visible_space_below , minimum_possible_height )
1225
1229
infobox = paint .paint_infobox (info_max_rows ,
1226
1230
int (width * self .config .cli_suggestion_width ),
1227
1231
self .matches_iter .matches ,
@@ -1234,8 +1238,6 @@ def move_screen_up(current_line_start_row):
1234
1238
else None )
1235
1239
1236
1240
if visible_space_below >= infobox .height or not self .config .curtsies_list_above :
1237
- if visible_space_below < infobox .height :
1238
- raise ValueError ('whoops %r %r' % (visible_space_below , infobox .height ))
1239
1241
arr [current_line_end_row + 1 :current_line_end_row + 1 + infobox .height , 0 :infobox .width ] = infobox
1240
1242
else :
1241
1243
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