fakevim: Allow to set g flag for movement

Enabled commands are for example 'dgg', 'cge', 'y10gg' etc.

Change-Id: I084991f1d352ee8bcec97cf756f7884d64b4e502
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
Lukas Holecek
2012-11-21 18:01:13 +01:00
committed by hjk
parent f302f3b8c2
commit 66aa861c51

View File

@@ -3047,6 +3047,9 @@ bool FakeVimHandler::Private::handleMovement(const Input &input)
m_subsubmode = FtSubSubMode;
m_movetype = MoveExclusive;
m_subsubdata = input;
} else if (!m_gflag && input.is('g')) {
m_gflag = true;
return true;
} else if (input.is('g') || input.is('G')) {
QString dotCommand = QString("%1G").arg(count);
recordJump();
@@ -3064,6 +3067,7 @@ bool FakeVimHandler::Private::handleMovement(const Input &input)
setAnchor();
setPosition(firstPositionInLine(n, false));
}
setTargetColumn();
} else if (input.is('h') || input.isKey(Key_Left) || input.isBackspace()) {
m_movetype = MoveExclusive;
int n = qMin(count, leftDist());