X Tutup
Skip to content

Commit 24e478c

Browse files
committed
Only restore indentation when inside a block.
1 parent 60ba1f2 commit 24e478c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

bpython/repl.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -678,8 +678,9 @@ def reevaluate(self):
678678
self.s = ''
679679
self.scr.refresh()
680680

681-
for _ in xrange(indent):
682-
self.tab()
681+
if self.buffer:
682+
for _ in xrange(indent):
683+
self.tab()
683684

684685
self.evaluating = False
685686
#map(self.push, self.history)

0 commit comments

Comments
 (0)
X Tutup