Commit 98406e3e authored by Martin Aumüller's avatar Martin Aumüller Committed by hjk
Browse files

Revert "fakevim: fix QTCREATORBUG-880"

This reverts commit 81ff5cda

,
except for the addition of '_' as a synonym for '^'.

Further commits have a different kind of fix  that maintains that
Escape always takes one back to the editor.

Merge-request: 131
Reviewed-by: default avatarhjk <qtc-committer@nokia.com>
parent a2ad2bd5
......@@ -591,8 +591,9 @@ bool FakeVimHandler::Private::wantsOverride(QKeyEvent *ev)
if (key == Key_Escape || (mods == Qt::ControlModifier && key == Key_BracketLeft)) {
// Not sure this feels good. People often hit Esc several times
//return !isNoVisualMode() || m_mode != CommandMode;
return !m_passing;
if (isNoVisualMode() && m_mode == CommandMode)
return false;
return true;
}
// We are interested in overriding most Ctrl key combinations
......@@ -1924,7 +1925,7 @@ EventResult FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
removeSelectedText();
} else if (key == Key_BracketLeft || key == Key_BracketRight) {
} else if (key == Key_Escape || key == 379 /* ^[ */) {
} else if (key == Key_Escape) {
if (isVisualMode()) {
leaveVisualMode();
} else if (m_submode != NoSubMode) {
......@@ -2126,7 +2127,7 @@ EventResult FakeVimHandler::Private::handleMiniBufferModes(int key, int unmodifi
{
Q_UNUSED(text)
if (key == Key_Escape || key == 379 /* ^[ */ || key == control('c')) {
if (key == Key_Escape || key == control('c')) {
m_commandBuffer.clear();
enterCommandMode();
updateMiniBuffer();
......
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