Show More
@@ -941,6 +941,11 class ConsoleWidget(Configurable, QtGui.QWidget): | |||
|
941 | 941 | #------ No modifiers --------------------------------------------------- |
|
942 | 942 | |
|
943 | 943 | else: |
|
944 | if shift_down: | |
|
945 | anchormode=QtGui.QTextCursor.KeepAnchor | |
|
946 | else: | |
|
947 | anchormode=QtGui.QTextCursor.MoveAnchor | |
|
948 | ||
|
944 | 949 | if key == QtCore.Qt.Key_Escape: |
|
945 | 950 | self._keyboard_quit() |
|
946 | 951 | intercepted = True |
@@ -969,8 +974,10 class ConsoleWidget(Configurable, QtGui.QWidget): | |||
|
969 | 974 | line, col = cursor.blockNumber(), cursor.columnNumber() |
|
970 | 975 | if line > self._get_prompt_cursor().blockNumber() and \ |
|
971 | 976 | col == len(self._continuation_prompt): |
|
972 |
self._control.moveCursor(QtGui.QTextCursor.PreviousBlock |
|
|
973 | self._control.moveCursor(QtGui.QTextCursor.EndOfBlock) | |
|
977 | self._control.moveCursor(QtGui.QTextCursor.PreviousBlock, | |
|
978 | mode=anchormode) | |
|
979 | self._control.moveCursor(QtGui.QTextCursor.EndOfBlock, | |
|
980 | mode=anchormode) | |
|
974 | 981 | intercepted = True |
|
975 | 982 | |
|
976 | 983 | # Regular left movement |
@@ -979,10 +986,12 class ConsoleWidget(Configurable, QtGui.QWidget): | |||
|
979 | 986 | |
|
980 | 987 | elif key == QtCore.Qt.Key_Right: |
|
981 | 988 | original_block_number = cursor.blockNumber() |
|
982 |
cursor.movePosition(QtGui.QTextCursor.Right |
|
|
989 | cursor.movePosition(QtGui.QTextCursor.Right, | |
|
990 | mode=anchormode) | |
|
983 | 991 | if cursor.blockNumber() != original_block_number: |
|
984 | 992 | cursor.movePosition(QtGui.QTextCursor.Right, |
|
985 |
n=len(self._continuation_prompt) |
|
|
993 | n=len(self._continuation_prompt), | |
|
994 | mode=anchormode) | |
|
986 | 995 | self._set_cursor(cursor) |
|
987 | 996 | intercepted = True |
|
988 | 997 |
General Comments 0
You need to be logged in to leave comments.
Login now