Skip to content

Commit 4cbc0ae

Browse files
horizontally-fix size of suggestion box
--HG-- branch : scroll-frontend
1 parent 8b99605 commit 4cbc0ae

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

bpython/scrollfrontend/replpainter.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,15 @@ def paint_infobox(rows, columns, matches, argspec, match, docstring, config):
5656
"""Returns painted completions, argspec, match, docstring etc."""
5757
if not (rows and columns):
5858
return fsarray(0, 0)
59+
width = columns - 2
5960
color = func_for_letter(config.color_scheme['main'])
60-
lines = ((display_linize(blue(formatted_argspec(argspec)), columns-2) if argspec else []) +
61+
lines = ((display_linize(blue(formatted_argspec(argspec)), width) if argspec else []) +
6162
([fmtstr('')] if docstring else []) +
62-
sum(([color(x) for x in display_linize(line, columns-2)]
63+
sum(([color(x) for x in display_linize(line, width)]
6364
for line in docstring.split('\n')) if docstring else [], []) +
6465
(matches_lines(rows, columns, matches, match, config) if matches else [])
6566
)
6667

67-
# add borders
68-
width = min(columns - 2, max([len(line) for line in lines]))
6968
output_lines = []
7069
output_lines.append(u'┌'+u'─'*width+u'┐')
7170
for line in lines:

0 commit comments

Comments
 (0)