diff options
author | Nikolai Kosjar <nikolai.kosjar@digia.com> | 2014-02-26 12:39:29 -0300 |
---|---|---|
committer | Nikolai Kosjar <nikolai.kosjar@digia.com> | 2014-02-26 18:17:39 +0100 |
commit | 453389e9d23c69309251252a27091fbcf0ff7f8a (patch) | |
tree | 7b5436b856862c0743ee61cc37add997d259e740 /src/plugins/cppeditor/cpphighlighter.cpp | |
parent | 21ce31a4ef27cd01f4ac7b724b9759645a7c4f95 (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.cpp | 2 |
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) |