##// END OF EJS Templates
bring multiline-hist fix from trunk into zmq console
MinRK -
Show More
@@ -227,6 +227,9 b' class ZMQTerminalInteractiveShell(TerminalInteractiveShell):'
227
227
228 if self.has_readline:
228 if self.has_readline:
229 self.readline_startup_hook(self.pre_readline)
229 self.readline_startup_hook(self.pre_readline)
230 hlen_b4_cell = self.readline.get_current_history_length()
231 else:
232 hlen_b4_cell = 0
230 # exit_now is set by a call to %Exit or %Quit, through the
233 # exit_now is set by a call to %Exit or %Quit, through the
231 # ask_exit callback.
234 # ask_exit callback.
232
235
@@ -271,7 +274,8 b' class ZMQTerminalInteractiveShell(TerminalInteractiveShell):'
271 #double-guard against keyboardinterrupts during kbdint handling
274 #double-guard against keyboardinterrupts during kbdint handling
272 try:
275 try:
273 self.write('\nKeyboardInterrupt\n')
276 self.write('\nKeyboardInterrupt\n')
274 self.input_splitter.reset()
277 source_raw = self.input_splitter.source_raw_reset()[1]
278 hlen_b4_cell = self._replace_rlhist_multiline(source_raw, hlen_b4_cell)
275 more = False
279 more = False
276 except KeyboardInterrupt:
280 except KeyboardInterrupt:
277 pass
281 pass
@@ -299,6 +303,7 b' class ZMQTerminalInteractiveShell(TerminalInteractiveShell):'
299 self.edit_syntax_error()
303 self.edit_syntax_error()
300 if not more:
304 if not more:
301 source_raw = self.input_splitter.source_reset()
305 source_raw = self.input_splitter.source_reset()
306 hlen_b4_cell = self._replace_rlhist_multiline(source_raw, hlen_b4_cell)
302 self.run_cell(source_raw)
307 self.run_cell(source_raw)
303
308
304
309
General Comments 0
You need to be logged in to leave comments. Login now