Map n and N in FakeVim to the FIND_NEXT and FIND_PREVIOUS actions.

This commit is contained in:
Rhys Weatherley
2009-05-29 11:34:11 +10:00
parent 6d4d0f044d
commit 4350baeea1
3 changed files with 16 additions and 4 deletions

View File

@@ -944,9 +944,9 @@ EventResult FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
// Recognize ZZ and ZQ as aliases for ":x" and ":q!".
m_submode = NoSubMode;
if (key == 'Z')
handleExCommand("x");
handleCommand("x");
else if (key == 'Q')
handleExCommand("q!");
handleCommand("q!");
} else if (m_subsubmode == FtSubSubMode) {
m_semicolonType = m_subsubdata;
m_semicolonKey = key;
@@ -1291,10 +1291,10 @@ EventResult FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
handleStartOfLine();
finishMovement();
} else if (key == 'n') {
search(lastSearchString(), m_lastSearchForward);
emit q->findNextRequested(false);
recordJump();
} else if (key == 'N') {
search(lastSearchString(), !m_lastSearchForward);
emit q->findNextRequested(true);
recordJump();
} else if (key == 'o' || key == 'O') {
setDotCommand("%1o", count());