From ffc082a3b3d17770530c281b9f647e88a2ac1665 Mon Sep 17 00:00:00 2001 From: mae <qtc-committer@nokia.com> Date: Fri, 12 Dec 2008 18:25:24 +0100 Subject: [PATCH] small fix for collapse/expand --- 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 1db9ad6a5cb..870f826ebf2 100644 --- a/src/plugins/texteditor/basetexteditor.cpp +++ b/src/plugins/texteditor/basetexteditor.cpp @@ -3404,7 +3404,7 @@ void BaseTextEditor::collapse() QTextBlock curBlock = block; while (block.isValid()) { if (TextBlockUserData::canCollapse(block) && block.next().isVisible()) { - if (block == curBlock) + if (block == curBlock || block.next() == curBlock) break; if ((block.next().userState()) >> 8 <= (curBlock.previous().userState() >> 8)) break; -- GitLab