Commit d759a213 authored by hjk's avatar hjk Committed by hjk
Browse files

fakevim: make <Esc> leave DeleteSubMode

Task-number: QTCREATORBUG-5636
Change-Id: I875b469d937e63b3486fe64c2763cf536b89ac8f
Reviewed-on: http://codereview.qt.nokia.com/2553

Reviewed-by: default avatarhjk <qthjk@ovi.com>
parent 18b74f08
......@@ -1113,14 +1113,17 @@ bool FakeVimHandler::Private::wantsOverride(QKeyEvent *ev)
if (key == Key_Escape) {
if (m_subsubmode == SearchSubSubMode)
return true;
// Not sure this feels good. People often hit Esc several times
if (isNoVisualMode() && m_mode == CommandMode
&& m_opcount.isEmpty() && m_mvcount.isEmpty())
// Not sure this feels good. People often hit Esc several times.
if (isNoVisualMode()
&& m_mode == CommandMode
&& m_submode == NoSubMode
&& m_opcount.isEmpty()
&& m_mvcount.isEmpty())
return false;
return true;
}
// We are interested in overriding most Ctrl key combinations
// We are interested in overriding most Ctrl key combinations.
if (mods == RealControlModifier
&& !config(ConfigPassControlKey).toBool()
&& ((key >= Key_A && key <= Key_Z && key != Key_K)
......@@ -1137,7 +1140,7 @@ bool FakeVimHandler::Private::wantsOverride(QKeyEvent *ev)
return true;
}
// Let other shortcuts trigger
// Let other shortcuts trigger.
return false;
}
......
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