We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 57d6e78 commit c064fd0Copy full SHA for c064fd0
bpython/curtsiesfrontend/repl.py
@@ -1561,9 +1561,16 @@ def take_back_buffer_line(self):
1561
self.buffer.pop()
1562
self.history.pop()
1563
1564
+ def take_back_empty_line(self):
1565
+ assert self.history and not self.history[-1]
1566
+ self.history.pop()
1567
+ self.display_lines.pop()
1568
+
1569
def prompt_undo(self):
1570
if self.buffer:
1571
return self.take_back_buffer_line()
1572
+ if self.history and not self.history[-1]:
1573
+ return self.take_back_empty_line()
1574
1575
def prompt_for_undo():
1576
n = BpythonRepl.prompt_undo(self)
0 commit comments