Commit ffc082a3 authored by mae's avatar mae
Browse files

small fix for collapse/expand

parent 27c4c1a7
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment