From 7ec3f73594c21aae67fa695b87c84152222a14bd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thorbj=C3=B8rn=20Lindeijer?= <thorbjorn.lindeijer@nokia.com>
Date: Tue, 17 Feb 2009 16:14:52 +0100
Subject: [PATCH] Center the cursor after (un)collapse all

Requested on the mailing list. Increases usability.
---
 src/plugins/texteditor/basetexteditor.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/plugins/texteditor/basetexteditor.cpp b/src/plugins/texteditor/basetexteditor.cpp
index d5b088396a5..1d0d910a4c8 100644
--- a/src/plugins/texteditor/basetexteditor.cpp
+++ b/src/plugins/texteditor/basetexteditor.cpp
@@ -3463,12 +3463,12 @@ void BaseTextEditor::unCollapseAll()
         if (TextBlockUserData::canCollapse(block))
             TextBlockUserData::doCollapse(block, makeVisible);
         block = block.next();
-
     }
 
     d->moveCursorVisible();
     documentLayout->requestUpdate();
     documentLayout->emitDocumentSizeChanged();
+    centerCursor();
 }
 
 void BaseTextEditor::setTextCodec(QTextCodec *codec)
-- 
GitLab