forked from qt-creator/qt-creator
fakevim: also repeat insertion with '.'
This commit is contained in:
@@ -882,9 +882,13 @@ bool FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
|
|||||||
updateMiniBuffer();
|
updateMiniBuffer();
|
||||||
} else if (key == '.') {
|
} else if (key == '.') {
|
||||||
qDebug() << "REPEATING" << m_dotCommand;
|
qDebug() << "REPEATING" << m_dotCommand;
|
||||||
|
QString savedCommand = m_dotCommand;
|
||||||
|
m_dotCommand.clear();
|
||||||
for (int i = count(); --i >= 0; )
|
for (int i = count(); --i >= 0; )
|
||||||
foreach (QChar c, m_dotCommand)
|
foreach (QChar c, savedCommand)
|
||||||
handleKey(c.unicode(), c.unicode(), QString(c));
|
handleKey(c.unicode(), c.unicode(), QString(c));
|
||||||
|
enterCommandMode();
|
||||||
|
m_dotCommand = savedCommand;
|
||||||
} else if (key == '=') {
|
} else if (key == '=') {
|
||||||
m_submode = IndentSubMode;
|
m_submode = IndentSubMode;
|
||||||
} else if (key == '%') {
|
} else if (key == '%') {
|
||||||
@@ -1269,6 +1273,7 @@ bool FakeVimHandler::Private::handleInsertMode(int key, int, const QString &text
|
|||||||
recordEndGroup();
|
recordEndGroup();
|
||||||
//qDebug() << "UNDO: " << m_undoStack;
|
//qDebug() << "UNDO: " << m_undoStack;
|
||||||
moveLeft(qMin(1, leftDist()));
|
moveLeft(qMin(1, leftDist()));
|
||||||
|
m_dotCommand += m_lastInsertion;
|
||||||
enterCommandMode();
|
enterCommandMode();
|
||||||
} else if (key == Key_Left) {
|
} else if (key == Key_Left) {
|
||||||
moveLeft(count());
|
moveLeft(count());
|
||||||
|
Reference in New Issue
Block a user