Show More
@@ -858,6 +858,11 b' class ConsoleWidget(LoggingConfigurable, QtGui.QWidget):' | |||
|
858 | 858 | |
|
859 | 859 | return result |
|
860 | 860 | |
|
861 | def _append_block(self, block_format=None, before_prompt=False): | |
|
862 | """ Appends an new QTextBlock to the end of the console buffer. | |
|
863 | """ | |
|
864 | self._append_custom(self._insert_block, block_format, before_prompt) | |
|
865 | ||
|
861 | 866 | def _append_html(self, html, before_prompt=False): |
|
862 | 867 | """ Appends HTML at the end of the console buffer. |
|
863 | 868 | """ |
@@ -1545,6 +1550,13 b' class ConsoleWidget(LoggingConfigurable, QtGui.QWidget):' | |||
|
1545 | 1550 | self._continuation_prompt = self._insert_html_fetching_plain_text( |
|
1546 | 1551 | cursor, self._continuation_prompt_html) |
|
1547 | 1552 | |
|
1553 | def _insert_block(self, cursor, block_format=None): | |
|
1554 | """ Inserts an empty QTextBlock using the specified cursor. | |
|
1555 | """ | |
|
1556 | if block_format is None: | |
|
1557 | block_format = QtGui.QTextBlockFormat() | |
|
1558 | cursor.insertBlock(block_format) | |
|
1559 | ||
|
1548 | 1560 | def _insert_html(self, cursor, html): |
|
1549 | 1561 | """ Inserts HTML using the specified cursor in such a way that future |
|
1550 | 1562 | formatting is unaffected. |
@@ -1866,7 +1878,7 b' class ConsoleWidget(LoggingConfigurable, QtGui.QWidget):' | |||
|
1866 | 1878 | cursor.movePosition(QtGui.QTextCursor.Left, |
|
1867 | 1879 | QtGui.QTextCursor.KeepAnchor) |
|
1868 | 1880 | if cursor.selection().toPlainText() != '\n': |
|
1869 |
self._append_ |
|
|
1881 | self._append_block() | |
|
1870 | 1882 | |
|
1871 | 1883 | # Write the prompt. |
|
1872 | 1884 | self._append_plain_text(self._prompt_sep) |
General Comments 0
You need to be logged in to leave comments.
Login now