CppEditor: Fix folding

The brace depth wasn't explicitly saved as block state and thus got
reset to 0.

Task-number: QTCREATORBUG-11566
Change-Id: I6c4f3c3392c01d65d7037c4723701ca8935ff70e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
Nikolai Kosjar
2014-02-26 12:39:29 -03:00
parent 21ce31a4ef
commit 453389e9d2

View File

@@ -94,7 +94,7 @@ void CppHighlighter::highlightBlock(const QString &text)
}
if (tokens.isEmpty()) {
setCurrentBlockState(state);
setCurrentBlockState((braceDepth << 8) | state);
BaseTextDocumentLayout::clearParentheses(currentBlock());
if (text.length()) {// the empty line can still contain whitespace
if (initialState == T_COMMENT)