Skip to content

Commit f9fa7e8

Browse files
make other frontends work
1 parent a0f2e2a commit f9fa7e8

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

bpython/curtsiesfrontend/repl.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -736,6 +736,7 @@ def update_completion(self, tab=False):
736736
self.list_win_visible = BpythonRepl.complete(self, tab)
737737

738738
def predicted_indent(self, line):
739+
#TODO get rid of this! It's repeated code! Combine with Repl.
739740
logger.debug('line is %r', line)
740741
indent = len(re.match(r'[ ]*', line).group())
741742
if line.endswith(':'):

bpython/repl.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -902,7 +902,8 @@ def undo(self, n=1):
902902
entries = list(self.rl_history.entries)
903903

904904
self.history = self.history[:-n]
905-
if n == 1 and not self.done:
905+
if (n == 1 and self.buffer and
906+
hasattr(self, 'take_back_buffer_line')):
906907
self.take_back_buffer_line()
907908
else:
908909
self.reevaluate()

0 commit comments

Comments
 (0)