Show More
@@ -171,7 +171,7 b' class ConsoleWidget(LoggingConfigurable, QtGui.QWidget):' | |||
|
171 | 171 | [ QtCore.Qt.Key_C, QtCore.Qt.Key_G, QtCore.Qt.Key_O, |
|
172 | 172 | QtCore.Qt.Key_V ]) |
|
173 | 173 | |
|
174 | _is_completing = False | |
|
174 | _temp_buffer_filled = False | |
|
175 | 175 | |
|
176 | 176 | #--------------------------------------------------------------------------- |
|
177 | 177 | # 'QObject' interface |
@@ -850,6 +850,7 b' class ConsoleWidget(LoggingConfigurable, QtGui.QWidget):' | |||
|
850 | 850 | the prompt region. |
|
851 | 851 | """ |
|
852 | 852 | # Select and remove all text below the input buffer. |
|
853 | _temp_buffer_filled = False | |
|
853 | 854 | cursor = self._get_prompt_cursor() |
|
854 | 855 | prompt = self._continuation_prompt.lstrip() |
|
855 | 856 | while cursor.movePosition(QtGui.QTextCursor.NextBlock): |
@@ -894,7 +895,6 b' class ConsoleWidget(LoggingConfigurable, QtGui.QWidget):' | |||
|
894 | 895 | |
|
895 | 896 | cursor.movePosition(QtGui.QTextCursor.Left, n=len(prefix)) |
|
896 | 897 | self._completion_widget.show_items(cursor, items) |
|
897 | self._is_completing = True | |
|
898 | 898 | |
|
899 | 899 | |
|
900 | 900 | def _fill_temporary_buffer(self, cursor, text, html=False): |
@@ -911,6 +911,8 b' class ConsoleWidget(LoggingConfigurable, QtGui.QWidget):' | |||
|
911 | 911 | self._control.moveCursor(QtGui.QTextCursor.End) |
|
912 | 912 | self._control.setTextCursor(cursor) |
|
913 | 913 | |
|
914 | _temp_buffer_filled = True | |
|
915 | ||
|
914 | 916 | |
|
915 | 917 | def _context_menu_make(self, pos): |
|
916 | 918 | """ Creates a context menu for the given QPoint (in widget coordinates). |
@@ -1654,8 +1656,9 b' class ConsoleWidget(LoggingConfigurable, QtGui.QWidget):' | |||
|
1654 | 1656 | def _keyboard_quit(self): |
|
1655 | 1657 | """ Cancels the current editing task ala Ctrl-G in Emacs. |
|
1656 | 1658 | """ |
|
1657 |
if self._ |
|
|
1659 | if self._temp_buffer_filled : | |
|
1658 | 1660 | self._cancel_completion() |
|
1661 | self._clear_temporary_buffer() | |
|
1659 | 1662 | else: |
|
1660 | 1663 | self.input_buffer = '' |
|
1661 | 1664 |
General Comments 0
You need to be logged in to leave comments.
Login now