forked from qt-creator/qt-creator
implement 'I' and 'gI'
This commit is contained in:
@@ -350,7 +350,7 @@ void FakeVimHandler::Private::handleCommandMode(int key, const QString &text)
|
|||||||
finishMovement();
|
finishMovement();
|
||||||
} else if (key >= '0' && key <= '9') {
|
} else if (key >= '0' && key <= '9') {
|
||||||
if (key == '0' && m_mvcount.isEmpty()) {
|
if (key == '0' && m_mvcount.isEmpty()) {
|
||||||
m_tc.movePosition(StartOfLine, KeepAnchor);
|
moveToFirstNonBlankOnLine();
|
||||||
finishMovement();
|
finishMovement();
|
||||||
} else {
|
} else {
|
||||||
m_mvcount.append(QChar(key));
|
m_mvcount.append(QChar(key));
|
||||||
@@ -450,6 +450,9 @@ void FakeVimHandler::Private::handleCommandMode(int key, const QString &text)
|
|||||||
m_lastInsertion.clear();
|
m_lastInsertion.clear();
|
||||||
} else if (key == 'I') {
|
} else if (key == 'I') {
|
||||||
m_mode = InsertMode;
|
m_mode = InsertMode;
|
||||||
|
if (m_gflag)
|
||||||
|
m_tc.movePosition(StartOfLine, KeepAnchor);
|
||||||
|
else
|
||||||
moveToFirstNonBlankOnLine();
|
moveToFirstNonBlankOnLine();
|
||||||
m_tc.clearSelection();
|
m_tc.clearSelection();
|
||||||
m_tc.beginEditBlock();
|
m_tc.beginEditBlock();
|
||||||
|
|||||||
Reference in New Issue
Block a user