From 15bfd49d10abc576d9f8fcc18097b96b0d9f297a 2011-11-07 18:42:32 From: Julian Taylor Date: 2011-11-07 18:42:32 Subject: [PATCH] initialize hlen_b4_cell also in the no readline case --- diff --git a/IPython/frontend/terminal/interactiveshell.py b/IPython/frontend/terminal/interactiveshell.py index 62b88b6..23cfe71 100644 --- a/IPython/frontend/terminal/interactiveshell.py +++ b/IPython/frontend/terminal/interactiveshell.py @@ -275,6 +275,8 @@ class TerminalInteractiveShell(InteractiveShell): if self.has_readline: self.readline_startup_hook(self.pre_readline) hlen_b4_cell = self.readline.get_current_history_length() + else: + hlen_b4_cell = 0 # exit_now is set by a call to %Exit or %Quit, through the # ask_exit callback.