aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cppeditor/cpphighlighter.cpp
diff options
context:
space:
mode:
authorNikolai Kosjar <nikolai.kosjar@digia.com>2014-02-26 12:39:29 -0300
committerNikolai Kosjar <nikolai.kosjar@digia.com>2014-02-26 18:17:39 +0100
commit453389e9d23c69309251252a27091fbcf0ff7f8a (patch)
tree7b5436b856862c0743ee61cc37add997d259e740 /src/plugins/cppeditor/cpphighlighter.cpp
parent21ce31a4ef27cd01f4ac7b724b9759645a7c4f95 (diff)
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>
Diffstat (limited to 'src/plugins/cppeditor/cpphighlighter.cpp')
-rw-r--r--src/plugins/cppeditor/cpphighlighter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/cppeditor/cpphighlighter.cpp b/src/plugins/cppeditor/cpphighlighter.cpp
index d039b9e147..7e9c7676c4 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)