Show More
@@ -109,6 +109,7 b' class ConsoleWidget(Configurable, QtGui.QWidget):' | |||||
109 | QtCore.Qt.Key_A : QtCore.Qt.Key_Home, |
|
109 | QtCore.Qt.Key_A : QtCore.Qt.Key_Home, | |
110 | QtCore.Qt.Key_P : QtCore.Qt.Key_Up, |
|
110 | QtCore.Qt.Key_P : QtCore.Qt.Key_Up, | |
111 | QtCore.Qt.Key_N : QtCore.Qt.Key_Down, |
|
111 | QtCore.Qt.Key_N : QtCore.Qt.Key_Down, | |
|
112 | QtCore.Qt.Key_H : QtCore.Qt.Key_Backspace, | |||
112 | QtCore.Qt.Key_D : QtCore.Qt.Key_Delete, } |
|
113 | QtCore.Qt.Key_D : QtCore.Qt.Key_Delete, } | |
113 | if not sys.platform == 'darwin': |
|
114 | if not sys.platform == 'darwin': | |
114 | # On OS X, Ctrl-E already does the right thing, whereas End moves the |
|
115 | # On OS X, Ctrl-E already does the right thing, whereas End moves the | |
@@ -963,6 +964,20 b' class ConsoleWidget(Configurable, QtGui.QWidget):' | |||||
963 | self._page_control.setFocus() |
|
964 | self._page_control.setFocus() | |
964 | intercepted = True |
|
965 | intercepted = True | |
965 |
|
966 | |||
|
967 | elif key == QtCore.Qt.Key_U: | |||
|
968 | if self._in_buffer(position): | |||
|
969 | start_line = cursor.blockNumber() | |||
|
970 | if start_line == self._get_prompt_cursor().blockNumber(): | |||
|
971 | offset = len(self._prompt) | |||
|
972 | else: | |||
|
973 | offset = len(self._continuation_prompt) | |||
|
974 | cursor.movePosition(QtGui.QTextCursor.StartOfBlock, | |||
|
975 | QtGui.QTextCursor.KeepAnchor) | |||
|
976 | cursor.movePosition(QtGui.QTextCursor.Right, | |||
|
977 | QtGui.QTextCursor.KeepAnchor, offset) | |||
|
978 | cursor.removeSelectedText() | |||
|
979 | intercepted = True | |||
|
980 | ||||
966 | elif key == QtCore.Qt.Key_Y: |
|
981 | elif key == QtCore.Qt.Key_Y: | |
967 | self.paste() |
|
982 | self.paste() | |
968 | intercepted = True |
|
983 | intercepted = True |
General Comments 0
You need to be logged in to leave comments.
Login now