Show More
@@ -719,6 +719,9 b' class ConsoleWidget(Configurable, QtGui.QWidget):' | |||
|
719 | 719 | self.paste() |
|
720 | 720 | intercepted = True |
|
721 | 721 | |
|
722 | elif key in (QtCore.Qt.Key_Backspace, QtCore.Qt.Key_Delete): | |
|
723 | intercepted = True | |
|
724 | ||
|
722 | 725 | elif alt_down: |
|
723 | 726 | if key == QtCore.Qt.Key_B: |
|
724 | 727 | self._set_cursor(self._get_word_start_cursor(position)) |
@@ -740,6 +743,9 b' class ConsoleWidget(Configurable, QtGui.QWidget):' | |||
|
740 | 743 | cursor.removeSelectedText() |
|
741 | 744 | intercepted = True |
|
742 | 745 | |
|
746 | elif key == QtCore.Qt.Key_Delete: | |
|
747 | intercepted = True | |
|
748 | ||
|
743 | 749 | elif key == QtCore.Qt.Key_Greater: |
|
744 | 750 | self._control.moveCursor(QtGui.QTextCursor.End) |
|
745 | 751 | intercepted = True |
@@ -831,10 +837,10 b' class ConsoleWidget(Configurable, QtGui.QWidget):' | |||
|
831 | 837 | elif key == QtCore.Qt.Key_Backspace: |
|
832 | 838 | |
|
833 | 839 | # Line deletion (remove continuation prompt) |
|
834 | len_prompt = len(self._continuation_prompt) | |
|
840 | line, col = cursor.blockNumber(), cursor.columnNumber() | |
|
835 | 841 | if not self._reading and \ |
|
836 |
|
|
|
837 |
|
|
|
842 | col == len(self._continuation_prompt) and \ | |
|
843 | line > self._get_prompt_cursor().blockNumber(): | |
|
838 | 844 | cursor.beginEditBlock() |
|
839 | 845 | cursor.movePosition(QtGui.QTextCursor.StartOfBlock, |
|
840 | 846 | QtGui.QTextCursor.KeepAnchor) |
@@ -854,8 +860,8 b' class ConsoleWidget(Configurable, QtGui.QWidget):' | |||
|
854 | 860 | elif key == QtCore.Qt.Key_Delete: |
|
855 | 861 | |
|
856 | 862 | # Line deletion (remove continuation prompt) |
|
857 |
if not self._reading and |
|
|
858 | cursor.hasSelection(): | |
|
863 | if not self._reading and self._in_buffer(position) and \ | |
|
864 | cursor.atBlockEnd() and not cursor.hasSelection(): | |
|
859 | 865 | cursor.movePosition(QtGui.QTextCursor.NextBlock, |
|
860 | 866 | QtGui.QTextCursor.KeepAnchor) |
|
861 | 867 | cursor.movePosition(QtGui.QTextCursor.Right, |
General Comments 0
You need to be logged in to leave comments.
Login now