fakevim: implement gm

Change-Id: I27d69414aff355dea1cf334830145dc50d407851
Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
hjk
2011-11-28 16:35:27 +01:00
committed by hjk
parent 3f943df966
commit d23e5f38b8

View File

@@ -2467,7 +2467,14 @@ EventResult FakeVimHandler::Private::handleCommandMode2(const Input &input)
} else if (input.isControl('l')) {
// screen redraw. should not be needed
} else if (input.is('m')) {
m_subsubmode = MarkSubSubMode;
if (m_gflag) {
moveToStartOfLine();
moveRight(qMin(columnsOnScreen() / 2, rightDist()) - 1);
setTargetColumn();
finishMovement();
} else {
m_subsubmode = MarkSubSubMode;
}
} else if (input.is('M')) {
QTextCursor tc = EDITOR(cursorForPosition(QPoint(0, EDITOR(height()) / 2)));
setCursor(tc);