forked from qt-creator/qt-creator
fakevim: fix undo for indenting
previously, indenting would have been undone line by line Merge-request: 96 Reviewed-by: hjk <qtc-committer@nokia.com>
This commit is contained in:
@@ -839,7 +839,9 @@ void FakeVimHandler::Private::finishMovement(const QString &dotCommand)
|
|||||||
m_submode = NoSubMode;
|
m_submode = NoSubMode;
|
||||||
} else if (m_submode == IndentSubMode) {
|
} else if (m_submode == IndentSubMode) {
|
||||||
recordJump();
|
recordJump();
|
||||||
|
beginEditBlock();
|
||||||
indentRegion();
|
indentRegion();
|
||||||
|
endEditBlock();
|
||||||
m_submode = NoSubMode;
|
m_submode = NoSubMode;
|
||||||
updateMiniBuffer();
|
updateMiniBuffer();
|
||||||
} else if (m_submode == ShiftRightSubMode) {
|
} else if (m_submode == ShiftRightSubMode) {
|
||||||
@@ -1247,7 +1249,9 @@ EventResult FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
|
|||||||
} else if (key == '=' && isNoVisualMode()) {
|
} else if (key == '=' && isNoVisualMode()) {
|
||||||
m_submode = IndentSubMode;
|
m_submode = IndentSubMode;
|
||||||
} else if (key == '=' && isVisualMode()) {
|
} else if (key == '=' && isVisualMode()) {
|
||||||
|
beginEditBlock();
|
||||||
indentRegion();
|
indentRegion();
|
||||||
|
endEditBlock();
|
||||||
leaveVisualMode();
|
leaveVisualMode();
|
||||||
} else if (key == '%') {
|
} else if (key == '%') {
|
||||||
m_movetype = MoveExclusive;
|
m_movetype = MoveExclusive;
|
||||||
|
Reference in New Issue
Block a user