Commit 7e8db09c authored by Lukas Holecek's avatar Lukas Holecek Committed by hjk

FakeVim: Set correct cursor shape if submitted search failed

Change-Id: I508ca523c70846924dc9b869ef105d273892e0bb
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent ec607055
......@@ -1678,6 +1678,7 @@ public:
// Call after any FakeVim processing
// (if needUpdate is true, export cursor position to editor and scroll)
void leaveFakeVim(bool needUpdate = true);
void leaveFakeVim(EventResult eventResult);
EventResult handleKey(const Input &input);
EventResult handleDefaultKey(const Input &input);
......@@ -2447,6 +2448,11 @@ void FakeVimHandler::Private::leaveFakeVim(bool needUpdate)
m_inFakeVim = false;
}
void FakeVimHandler::Private::leaveFakeVim(EventResult eventResult)
{
leaveFakeVim(eventResult == EventHandled || eventResult == EventCancelled);
}
bool FakeVimHandler::Private::wantsOverride(QKeyEvent *ev)
{
const int key = ev->key();
......@@ -2542,7 +2548,7 @@ EventResult FakeVimHandler::Private::handleEvent(QKeyEvent *ev)
enterFakeVim();
EventResult result = handleKey(Input(key, mods, ev->text()));
leaveFakeVim(result == EventHandled);
leaveFakeVim(result);
return result;
}
......@@ -7594,7 +7600,7 @@ void FakeVimHandler::Private::onInputTimeout()
{
enterFakeVim();
EventResult result = handleKey(Input());
leaveFakeVim(result == EventHandled);
leaveFakeVim(result);
}
void FakeVimHandler::Private::onFixCursorTimeout()
......
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