Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9ce515f

Browse filesBrowse files
fix remove paren in take_back_buffer_line
1 parent 71955bd commit 9ce515f
Copy full SHA for 9ce515f

1 file changed

+4-4Lines changed: 4 additions & 4 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎bpython/curtsiesfrontend/repl.py‎

Copy file name to clipboardExpand all lines: bpython/curtsiesfrontend/repl.py
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1283,17 +1283,17 @@ def reprint_line(self, lineno, tokens):
12831283
self.display_buffer[lineno] = bpythonparse(format(tokens, self.formatter))
12841284

12851285
def take_back_buffer_line(self):
1286-
self.display_buffer.pop()
1287-
self.buffer.pop()
1288-
1289-
if not self.buffer:
1286+
assert len(self.buffer) > 0
1287+
if len(self.buffer) == 1:
12901288
self._cursor_offset = 0
12911289
self.current_line = ''
12921290
else:
12931291
line = self.buffer[-1]
12941292
indent = self.predicted_indent(line)
12951293
self._current_line = indent * ' '
12961294
self.cursor_offset = len(self.current_line)
1295+
self.display_buffer.pop()
1296+
self.buffer.pop()
12971297

12981298
def reevaluate(self, insert_into_history=False):
12991299
"""bpython.Repl.undo calls this"""

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.