Skip to content

Commit d245a89

Browse files
committed
Fixed a bug with redrawing after paren matching.
1 parent 6054b16 commit d245a89

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

bpython/cli.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1488,6 +1488,8 @@ def reprint_line(lineno, s, to_replace=[]):
14881488
o = format(t, BPythonFormatter(OPTS.color_scheme))
14891489
self.scr.move(lineno, 4)
14901490
map(self.echo, o.split('\x04'))
1491+
1492+
y, x = self.scr.getyx()
14911493
if self.highlighted_paren:
14921494
# Clear previous highlighted paren
14931495
reprint_line(*self.highlighted_paren)
@@ -1496,7 +1498,6 @@ def reprint_line(lineno, s, to_replace=[]):
14961498
source = '\n'.join(self.buffer) + '\n%s' % (s, )
14971499
i = line = 0
14981500
pos = 3
1499-
y, x = self.scr.getyx()
15001501
for (token, value) in PythonLexer().get_tokens(source):
15011502
pos += len(value)
15021503
under_cursor = (line == len(self.buffer) and pos == x)

0 commit comments

Comments
 (0)