@@ -56,30 +56,30 @@ def paginate(rows, matches, current, words_wide):
56
56
return matches [per_page * current_page :per_page * (current_page + 1 )]
57
57
58
58
59
- def matches_lines (rows , columns , matches , current , config , format ):
59
+ def matches_lines (rows , columns , matches , current , config , match_format ):
60
60
highlight_color = func_for_letter (config .color_scheme ['operator' ].lower ())
61
61
62
62
if not matches :
63
63
return []
64
64
color = func_for_letter (config .color_scheme ['main' ])
65
65
max_match_width = max (len (m ) for m in matches )
66
66
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 ]
68
68
if current :
69
- current = format (current )
69
+ current = match_format (current )
70
70
71
71
matches = paginate (rows , matches , current , words_wide )
72
72
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 ])
78
78
for i in range (0 , len (matches ), words_wide )]
79
79
80
80
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
83
83
84
84
85
85
def formatted_argspec (funcprops , arg_pos , columns , config ):
@@ -175,7 +175,7 @@ def formatted_docstring(docstring, columns, config):
175
175
176
176
177
177
def paint_infobox (rows , columns , matches , funcprops , arg_pos , match , docstring ,
178
- config , format ):
178
+ config , match_format ):
179
179
"""Returns painted completions, funcprops, match, docstring etc."""
180
180
if not (rows and columns ):
181
181
return fsarray (0 , 0 )
@@ -185,7 +185,7 @@ def paint_infobox(rows, columns, matches, funcprops, arg_pos, match, docstring,
185
185
from_doc = (formatted_docstring (docstring , width , config )
186
186
if docstring else [])
187
187
from_matches = (matches_lines (max (1 , rows - len (from_argspec ) - 2 ),
188
- width , matches , match , config , format )
188
+ width , matches , match , config , match_format )
189
189
if matches else [])
190
190
191
191
lines = from_argspec + from_matches + from_doc
0 commit comments