diff --git a/src/plugins/cppeditor/cpphighlighter.cpp b/src/plugins/cppeditor/cpphighlighter.cpp index d039b9e1477..7e9c7676c45 100644 --- a/src/plugins/cppeditor/cpphighlighter.cpp +++ b/src/plugins/cppeditor/cpphighlighter.cpp @@ -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)