fakevim: fix Delete key in command mode

This commit is contained in:
hjk
2010-06-23 15:13:51 +02:00
parent d2ea5a4843
commit bb0f033b92

View File

@@ -2458,21 +2458,21 @@ EventResult FakeVimHandler::Private::handleCommandMode(const Input &input)
else if (input.is('U'))
m_subsubmode = UpCaseSubSubMode;
finishMovement();
} else if (input.is(Key_PageDown) || input.isControl('f')) {
} else if (input.isKey(Key_PageDown) || input.isControl('f')) {
moveDown(count() * (linesOnScreen() - 2) - cursorLineOnScreen());
scrollToLineInDocument(cursorLineInDocument());
handleStartOfLine();
finishMovement();
} else if (input.is(Key_PageUp) || input.isControl('b')) {
} else if (input.isKey(Key_PageUp) || input.isControl('b')) {
moveUp(count() * (linesOnScreen() - 2) + cursorLineOnScreen());
scrollToLineInDocument(cursorLineInDocument() + linesOnScreen() - 2);
handleStartOfLine();
finishMovement();
} else if (input.is(Key_Delete)) {
} else if (input.isKey(Key_Delete)) {
setAnchor();
moveRight(qMin(1, rightDist()));
removeText(currentRange());
} else if (input.is(Key_BracketLeft) || input.is(Key_BracketRight)) {
} else if (input.isKey(Key_BracketLeft) || input.isKey(Key_BracketRight)) {
} else if (input.isControl(Key_BracketRight)) {
handleExCommand("tag");