Show More
@@ -772,7 +772,7 b' class ConsoleWidget(LoggingConfigurable, QtGui.QWidget):' | |||||
772 | """ |
|
772 | """ | |
773 | # Determine where to insert the content. |
|
773 | # Determine where to insert the content. | |
774 | cursor = self._control.textCursor() |
|
774 | cursor = self._control.textCursor() | |
775 | if before_prompt and not self._executing: |
|
775 | if before_prompt and (self._reading or not self._executing): | |
776 | cursor.setPosition(self._append_before_prompt_pos) |
|
776 | cursor.setPosition(self._append_before_prompt_pos) | |
777 | else: |
|
777 | else: | |
778 | cursor.movePosition(QtGui.QTextCursor.End) |
|
778 | cursor.movePosition(QtGui.QTextCursor.End) |
@@ -597,7 +597,9 b' class FrontendWidget(HistoryConsoleWidget, BaseFrontendMixin):' | |||||
597 | self.kernel_manager.restart_kernel(now=now) |
|
597 | self.kernel_manager.restart_kernel(now=now) | |
598 | except RuntimeError: |
|
598 | except RuntimeError: | |
599 | self._append_plain_text('Kernel started externally. ' |
|
599 | self._append_plain_text('Kernel started externally. ' | |
600 |
'Cannot restart.\n' |
|
600 | 'Cannot restart.\n', | |
|
601 | before_prompt=True | |||
|
602 | ) | |||
601 | else: |
|
603 | else: | |
602 | self.reset() |
|
604 | self.reset() | |
603 | else: |
|
605 | else: | |
@@ -605,7 +607,9 b' class FrontendWidget(HistoryConsoleWidget, BaseFrontendMixin):' | |||||
605 |
|
607 | |||
606 | else: |
|
608 | else: | |
607 | self._append_plain_text('Kernel process is either remote or ' |
|
609 | self._append_plain_text('Kernel process is either remote or ' | |
608 |
'unspecified. Cannot restart.\n' |
|
610 | 'unspecified. Cannot restart.\n', | |
|
611 | before_prompt=True | |||
|
612 | ) | |||
609 |
|
613 | |||
610 | #--------------------------------------------------------------------------- |
|
614 | #--------------------------------------------------------------------------- | |
611 | # 'FrontendWidget' protected interface |
|
615 | # 'FrontendWidget' protected interface |
General Comments 0
You need to be logged in to leave comments.
Login now