Commit 8c944eda authored by hluk's avatar hluk Committed by hjk

FakeVim: Fix cursor position and anchor after search

Change-Id: I1e093d042033d87f0382560e00f71d24c7f55b03
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent f20dd4f9
......@@ -4781,8 +4781,8 @@ EventResult FakeVimHandler::Private::handleSearchSubSubMode(const Input &input)
}
if (g.currentMessage.isEmpty())
showMessage(MessageCommand, g.searchBuffer.display());
else
handled = EventCancelled;
else if (g.currentMessageLevel == MessageError)
handled = EventCancelled; // Not found so cancel mapping if any.
enterCommandMode(g.returnToMode);
resetCommandMode();
g.searchBuffer.clear();
......@@ -6033,7 +6033,10 @@ void FakeVimHandler::Private::miniBufferTextEdited(const QString &text, int curs
editor()->setFocus();
} else if (text.isEmpty()) {
// editing cancelled
enterFakeVim();
handleDefaultKey(Input(Qt::Key_Escape, Qt::NoModifier, QString()));
leaveFakeVim();
editor()->setFocus();
updateCursorShape();
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment