Commit d6b770586d9b13eae66d33c550c5aba8009541a3
- Diff rendering mode:
- inline
- side by side
src/plugins/cppeditor/cpphighlighter.cpp
(1 / 3)
|   | |||
| 48 | 48 | ||
| 49 | 49 | void CppHighlighter::highlightBlock(const QString &text) | |
| 50 | 50 | { | |
| 51 | QTextCharFormat emptyFormat; | ||
| 52 | |||
| 53 | 51 | const int previousState = previousBlockState(); | |
| 54 | 52 | int state = 0, initialBraceDepth = 0; | |
| 55 | 53 | if (previousState != -1) { | |
| … | … | ||
| 223 | 223 | if (oldState == tokenize.state() && oldBraceDepth != braceDepth) { | |
| 224 | 224 | int delta = braceDepth - oldBraceDepth; | |
| 225 | 225 | QTextBlock block = currentBlock().next(); | |
| 226 | while (block.isValid()) { | ||
| 226 | while (block.isValid() && block.userState() != -1) { | ||
| 227 | 227 | TextEditDocumentLayout::changeBraceDepth(block, delta); | |
| 228 | 228 | block = block.next(); | |
| 229 | 229 | } |
Comments
Add a new comment:
Login or create an account to post a comment
Add your comment
Please log in to comment

