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