Show More
@@ -956,6 +956,11 b' class ConsoleWidget(Configurable, QtGui.QWidget):' | |||||
956 | #------ No modifiers --------------------------------------------------- |
|
956 | #------ No modifiers --------------------------------------------------- | |
957 |
|
957 | |||
958 | else: |
|
958 | else: | |
|
959 | if shift_down: | |||
|
960 | anchormode=QtGui.QTextCursor.KeepAnchor | |||
|
961 | else: | |||
|
962 | anchormode=QtGui.QTextCursor.MoveAnchor | |||
|
963 | ||||
959 | if key == QtCore.Qt.Key_Escape: |
|
964 | if key == QtCore.Qt.Key_Escape: | |
960 | self._keyboard_quit() |
|
965 | self._keyboard_quit() | |
961 | intercepted = True |
|
966 | intercepted = True | |
@@ -984,8 +989,10 b' class ConsoleWidget(Configurable, QtGui.QWidget):' | |||||
984 | line, col = cursor.blockNumber(), cursor.columnNumber() |
|
989 | line, col = cursor.blockNumber(), cursor.columnNumber() | |
985 | if line > self._get_prompt_cursor().blockNumber() and \ |
|
990 | if line > self._get_prompt_cursor().blockNumber() and \ | |
986 | col == len(self._continuation_prompt): |
|
991 | col == len(self._continuation_prompt): | |
987 |
self._control.moveCursor(QtGui.QTextCursor.PreviousBlock |
|
992 | self._control.moveCursor(QtGui.QTextCursor.PreviousBlock, | |
988 | self._control.moveCursor(QtGui.QTextCursor.EndOfBlock) |
|
993 | mode=anchormode) | |
|
994 | self._control.moveCursor(QtGui.QTextCursor.EndOfBlock, | |||
|
995 | mode=anchormode) | |||
989 | intercepted = True |
|
996 | intercepted = True | |
990 |
|
997 | |||
991 | # Regular left movement |
|
998 | # Regular left movement | |
@@ -994,10 +1001,12 b' class ConsoleWidget(Configurable, QtGui.QWidget):' | |||||
994 |
|
1001 | |||
995 | elif key == QtCore.Qt.Key_Right: |
|
1002 | elif key == QtCore.Qt.Key_Right: | |
996 | original_block_number = cursor.blockNumber() |
|
1003 | original_block_number = cursor.blockNumber() | |
997 |
cursor.movePosition(QtGui.QTextCursor.Right |
|
1004 | cursor.movePosition(QtGui.QTextCursor.Right, | |
|
1005 | mode=anchormode) | |||
998 | if cursor.blockNumber() != original_block_number: |
|
1006 | if cursor.blockNumber() != original_block_number: | |
999 | cursor.movePosition(QtGui.QTextCursor.Right, |
|
1007 | cursor.movePosition(QtGui.QTextCursor.Right, | |
1000 |
n=len(self._continuation_prompt) |
|
1008 | n=len(self._continuation_prompt), | |
|
1009 | mode=anchormode) | |||
1001 | self._set_cursor(cursor) |
|
1010 | self._set_cursor(cursor) | |
1002 | intercepted = True |
|
1011 | intercepted = True | |
1003 |
|
1012 |
General Comments 0
You need to be logged in to leave comments.
Login now