File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff 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 (':' ):
Original file line number Diff line number Diff 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 ()
You can’t perform that action at this time.
0 commit comments