fakevim: [lineno]gg should behave as [lineno]G

Merge-request: 96
Reviewed-by: hjk <qtc-committer@nokia.com>
This commit is contained in:
Martin Aumüller
2010-01-05 18:42:25 +01:00
committed by hjk
parent 159e3f613d
commit c7281909c1

View File

@@ -1384,7 +1384,8 @@ EventResult FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
} else if (key == 'g') { } else if (key == 'g') {
if (m_gflag) { if (m_gflag) {
m_gflag = false; m_gflag = false;
m_tc.setPosition(firstPositionInLine(1), KeepAnchor); int n = m_mvcount.isEmpty() ? 1 : count();
m_tc.setPosition(firstPositionInLine(n), KeepAnchor);
handleStartOfLine(); handleStartOfLine();
finishMovement(); finishMovement();
} else { } else {