@@ -56,30 +56,30 @@ def paginate(rows, matches, current, words_wide):
5656 return matches [per_page * current_page :per_page * (current_page + 1 )]
5757
5858
59- def matches_lines (rows , columns , matches , current , config , format ):
59+ def matches_lines (rows , columns , matches , current , config , match_format ):
6060 highlight_color = func_for_letter (config .color_scheme ['operator' ].lower ())
6161
6262 if not matches :
6363 return []
6464 color = func_for_letter (config .color_scheme ['main' ])
6565 max_match_width = max (len (m ) for m in matches )
6666 words_wide = max (1 , (columns - 1 ) // (max_match_width + 1 ))
67- matches = [format (m ) for m in matches ]
67+ matches = [match_format (m ) for m in matches ]
6868 if current :
69- current = format (current )
69+ current = match_format (current )
7070
7171 matches = paginate (rows , matches , current , words_wide )
7272
73- matches_lines = [fmtstr (' ' ).join (color (m .ljust (max_match_width ))
74- if m != current
75- else highlight_color (
76- m .ljust (max_match_width ))
77- for m in matches [i :i + words_wide ])
73+ result = [fmtstr (' ' ).join (color (m .ljust (max_match_width ))
74+ if m != current
75+ else highlight_color (
76+ m .ljust (max_match_width ))
77+ for m in matches [i :i + words_wide ])
7878 for i in range (0 , len (matches ), words_wide )]
7979
8080 logger .debug ('match: %r' % current )
81- logger .debug ('matches_lines: %r' % matches_lines )
82- return matches_lines
81+ logger .debug ('matches_lines: %r' % result )
82+ return result
8383
8484
8585def formatted_argspec (funcprops , arg_pos , columns , config ):
@@ -175,7 +175,7 @@ def formatted_docstring(docstring, columns, config):
175175
176176
177177def paint_infobox (rows , columns , matches , funcprops , arg_pos , match , docstring ,
178- config , format ):
178+ config , match_format ):
179179 """Returns painted completions, funcprops, match, docstring etc."""
180180 if not (rows and columns ):
181181 return fsarray (0 , 0 )
@@ -185,7 +185,7 @@ def paint_infobox(rows, columns, matches, funcprops, arg_pos, match, docstring,
185185 from_doc = (formatted_docstring (docstring , width , config )
186186 if docstring else [])
187187 from_matches = (matches_lines (max (1 , rows - len (from_argspec ) - 2 ),
188- width , matches , match , config , format )
188+ width , matches , match , config , match_format )
189189 if matches else [])
190190
191191 lines = from_argspec + from_matches + from_doc
0 commit comments