Show More
@@ -406,6 +406,12 b' class ConsoleWidget(QtGui.QPlainTextEdit):' | |||
|
406 | 406 | entered by the user. The effect of this parameter depends on the |
|
407 | 407 | subclass implementation. |
|
408 | 408 | |
|
409 | Raises: | |
|
410 | ------- | |
|
411 | RuntimeError | |
|
412 | If incomplete input is given and 'hidden' is True. In this case, | |
|
413 | it not possible to prompt for more input. | |
|
414 | ||
|
409 | 415 | Returns: |
|
410 | 416 | -------- |
|
411 | 417 | A boolean indicating whether the source was executed. |
@@ -751,14 +757,14 b' class HistoryConsoleWidget(ConsoleWidget):' | |||
|
751 | 757 | def execute(self, source=None, hidden=False, interactive=False): |
|
752 | 758 | """ Reimplemented to the store history. |
|
753 | 759 | """ |
|
754 |
if |
|
|
755 |
history = self.input_buffer |
|
|
760 | if not hidden: | |
|
761 | history = self.input_buffer if source is None else source | |
|
756 | 762 | |
|
757 | 763 | executed = super(HistoryConsoleWidget, self).execute( |
|
758 | 764 | source, hidden, interactive) |
|
759 | 765 | |
|
760 | 766 | if executed and not hidden: |
|
761 | self._history.append(history) | |
|
767 | self._history.append(history.rstrip()) | |
|
762 | 768 | self._history_index = len(self._history) |
|
763 | 769 | |
|
764 | 770 | return executed |
General Comments 0
You need to be logged in to leave comments.
Login now