Commit 6d03617c authored by hjk's avatar hjk Committed by Roberto Raggi
Browse files

implement 'I' and 'gI'

parent c480442a
......@@ -350,7 +350,7 @@ void FakeVimHandler::Private::handleCommandMode(int key, const QString &text)
finishMovement();
} else if (key >= '0' && key <= '9') {
if (key == '0' && m_mvcount.isEmpty()) {
m_tc.movePosition(StartOfLine, KeepAnchor);
moveToFirstNonBlankOnLine();
finishMovement();
} else {
m_mvcount.append(QChar(key));
......@@ -450,7 +450,10 @@ void FakeVimHandler::Private::handleCommandMode(int key, const QString &text)
m_lastInsertion.clear();
} else if (key == 'I') {
m_mode = InsertMode;
moveToFirstNonBlankOnLine();
if (m_gflag)
m_tc.movePosition(StartOfLine, KeepAnchor);
else
moveToFirstNonBlankOnLine();
m_tc.clearSelection();
m_tc.beginEditBlock();
m_lastInsertion.clear();
......
Supports Markdown
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