##// END OF EJS Templates
Fixed bug where the banner message was syntax highlighted when the frontend connected to a new kernel.
epatters -
Show More
@@ -216,13 +216,13 b' class ConsoleWidget(QtGui.QWidget):'
216 216 pass
217 217 return False
218 218
219 def clear(self, keep_input=False):
219 def clear(self, keep_input=True):
220 220 """ Clear the console, then write a new prompt. If 'keep_input' is set,
221 221 restores the old input buffer when the new prompt is written.
222 222 """
223 self._control.clear()
224 223 if keep_input:
225 224 input_buffer = self.input_buffer
225 self._control.clear()
226 226 self._show_prompt()
227 227 if keep_input:
228 228 self.input_buffer = input_buffer
@@ -1074,12 +1074,6 b' class ConsoleWidget(QtGui.QWidget):'
1074 1074 self._reading_callback = lambda: \
1075 1075 callback(self.input_buffer.rstrip('\n'))
1076 1076
1077 def _reset(self):
1078 """ Clears the console and resets internal state variables.
1079 """
1080 self._control.clear()
1081 self._executing = self._reading = False
1082
1083 1077 def _set_continuation_prompt(self, prompt, html=False):
1084 1078 """ Sets the continuation prompt.
1085 1079
@@ -239,7 +239,7 b' class FrontendWidget(HistoryConsoleWidget, BaseFrontendMixin):'
239 239 """ Called when the KernelManager channels have started listening or
240 240 when the frontend is assigned an already listening KernelManager.
241 241 """
242 self._reset()
242 self._control.clear()
243 243 self._append_plain_text(self._get_banner())
244 244 self._show_interpreter_prompt()
245 245
@@ -247,8 +247,8 b' class FrontendWidget(HistoryConsoleWidget, BaseFrontendMixin):'
247 247 """ Called when the KernelManager channels have stopped listening or
248 248 when a listening KernelManager is removed from the frontend.
249 249 """
250 # FIXME: Print a message here?
251 pass
250 self._executing = self._reading = False
251 self._highlighter.highlighting_on = False
252 252
253 253 #---------------------------------------------------------------------------
254 254 # 'FrontendWidget' interface
General Comments 0
You need to be logged in to leave comments. Login now