summaryrefslogtreecommitdiffstats
path: root/scintilla/lexers/LexCPP.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'scintilla/lexers/LexCPP.cxx')
-rw-r--r--scintilla/lexers/LexCPP.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/scintilla/lexers/LexCPP.cxx b/scintilla/lexers/LexCPP.cxx
index 5485bf2..a78fcc0 100644
--- a/scintilla/lexers/LexCPP.cxx
+++ b/scintilla/lexers/LexCPP.cxx
@@ -1344,14 +1344,14 @@ void SCI_METHOD LexerCPP::Fold(unsigned int startPos, int length, int initStyle,
}
}
if (options.foldSyntaxBased && (style == SCE_C_OPERATOR)) {
- if (ch == '{') {
+ if (ch == '{' || ch == '[') {
// Measure the minimum before a '{' to allow
// folding on "} else {"
if (levelMinCurrent > levelNext) {
levelMinCurrent = levelNext;
}
levelNext++;
- } else if (ch == '}') {
+ } else if (ch == '}' || ch == ']') {
levelNext--;
}
}