Fix code folding issue with empty nested blocks like in:

void main()
{
{
}
int i;
}
This commit is contained in:
mae
2009-09-07 16:15:59 +02:00
parent 78d07c6d39
commit 9b4055122c
2 changed files with 3 additions and 6 deletions

View File

@@ -2833,7 +2833,7 @@ void BaseTextEditor::extraAreaMouseEvent(QMouseEvent *e)
document()->findBlockByNumber(d->m_highlightBlocksInfo.open.last()).position()
);
QTextBlock c = cursor.block();
if (!TextBlockUserData::canCollapse(c))
if (TextBlockUserData::hasCollapseAfter(c.previous()))
c = c.previous();
toggleBlockVisible(c);
d->moveCursorVisible(false);