Commit 06dfd937 authored by Martin Aumueller's avatar Martin Aumueller
Browse files

fakevim: implement 'gg' for moving to first line

parent 23a9971a
...@@ -951,7 +951,15 @@ bool FakeVimHandler::Private::handleCommandMode(int key, int unmodified, ...@@ -951,7 +951,15 @@ bool FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
m_subsubmode = FtSubSubMode; m_subsubmode = FtSubSubMode;
m_subsubdata = key; m_subsubdata = key;
} else if (key == 'g') { } else if (key == 'g') {
m_gflag = true; if (m_gflag) {
m_gflag = false;
m_tc.setPosition(firstPositionInLine(1), KeepAnchor);
if (m_config[ConfigStartOfLine] == ConfigOn)
moveToFirstNonBlankOnLine();
finishMovement();
} else {
m_gflag = true;
}
} else if (key == 'G') { } else if (key == 'G') {
int n = m_mvcount.isEmpty() ? linesInDocument() : count(); int n = m_mvcount.isEmpty() ? linesInDocument() : count();
m_tc.setPosition(firstPositionInLine(n), KeepAnchor); m_tc.setPosition(firstPositionInLine(n), KeepAnchor);
......
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