From a088b017134a13672371edd16ff52d2b59a4ac72 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Aum=C3=BCller?= <aumuell@reserv.at>
Date: Tue, 5 Jan 2010 18:42:26 +0100
Subject: [PATCH] fakevim: fix undo for indenting

previously, indenting would have been undone line by line

Merge-request: 96
Reviewed-by: hjk <qtc-committer@nokia.com>
---
 src/plugins/fakevim/fakevimhandler.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/plugins/fakevim/fakevimhandler.cpp b/src/plugins/fakevim/fakevimhandler.cpp
index 713c9baaec0..5527cdb8bc7 100755
--- a/src/plugins/fakevim/fakevimhandler.cpp
+++ b/src/plugins/fakevim/fakevimhandler.cpp
@@ -839,7 +839,9 @@ void FakeVimHandler::Private::finishMovement(const QString &dotCommand)
         m_submode = NoSubMode;
     } else if (m_submode == IndentSubMode) {
         recordJump();
+        beginEditBlock();
         indentRegion();
+        endEditBlock();
         m_submode = NoSubMode;
         updateMiniBuffer();
     } else if (m_submode == ShiftRightSubMode) {
@@ -1247,7 +1249,9 @@ EventResult FakeVimHandler::Private::handleCommandMode(int key, int unmodified,
     } else if (key == '=' && isNoVisualMode()) {
         m_submode = IndentSubMode;
     } else if (key == '=' && isVisualMode()) {
+        beginEditBlock();
         indentRegion();
+        endEditBlock();
         leaveVisualMode();
     } else if (key == '%') {
         m_movetype = MoveExclusive;
-- 
GitLab