forked from qt-creator/qt-creator
fakevim: make 'o' undo work in a single operation
This commit is contained in:
@@ -1406,6 +1406,7 @@ EventResult FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
|
|||||||
search(lastSearchString(), !m_lastSearchForward);
|
search(lastSearchString(), !m_lastSearchForward);
|
||||||
recordJump();
|
recordJump();
|
||||||
} else if (key == 'o' || key == 'O') {
|
} else if (key == 'o' || key == 'O') {
|
||||||
|
beginEditBlock();
|
||||||
setDotCommand("%1o", count());
|
setDotCommand("%1o", count());
|
||||||
enterInsertMode();
|
enterInsertMode();
|
||||||
moveToFirstNonBlankOnLine();
|
moveToFirstNonBlankOnLine();
|
||||||
@@ -1414,6 +1415,7 @@ EventResult FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
|
|||||||
moveToEndOfLine();
|
moveToEndOfLine();
|
||||||
m_tc.insertText("\n");
|
m_tc.insertText("\n");
|
||||||
insertAutomaticIndentation(key == 'o');
|
insertAutomaticIndentation(key == 'o');
|
||||||
|
endEditBlock();
|
||||||
} else if (key == control('o')) {
|
} else if (key == control('o')) {
|
||||||
if (!m_jumpListUndo.isEmpty()) {
|
if (!m_jumpListUndo.isEmpty()) {
|
||||||
m_jumpListRedo.append(cursorPosition());
|
m_jumpListRedo.append(cursorPosition());
|
||||||
|
Reference in New Issue
Block a user