aboutsummaryrefslogtreecommitdiffhomepage
path: root/lexers/LexCPP.cxx
diff options
context:
space:
mode:
authorColomban Wendling <ban@herbesfolles.org>2016-03-03 17:54:08 +0100
committerColomban Wendling <ban@herbesfolles.org>2016-03-03 17:54:08 +0100
commit0dc85c15010480e078766065a7bb61883fb44132 (patch)
tree2e805587ee4dc56712c64defca9e956024666515 /lexers/LexCPP.cxx
parentbb947090a07efeb103bd04560f1e7d967e741b2b (diff)
downloadscintilla-mirror-0dc85c15010480e078766065a7bb61883fb44132.tar.gz
CPP: Add support for folding on `(` and `)`
Feature [feature-requests:#1138].
Diffstat (limited to 'lexers/LexCPP.cxx')
-rw-r--r--lexers/LexCPP.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/lexers/LexCPP.cxx b/lexers/LexCPP.cxx
index fc9b5b86b..76190002a 100644
--- a/lexers/LexCPP.cxx
+++ b/lexers/LexCPP.cxx
@@ -1349,14 +1349,14 @@ void SCI_METHOD LexerCPP::Fold(Sci_PositionU startPos, Sci_Position length, int
}
}
if (options.foldSyntaxBased && (style == SCE_C_OPERATOR)) {
- if (ch == '{' || ch == '[') {
+ if (ch == '{' || ch == '[' || ch == '(') {
// Measure the minimum before a '{' to allow
// folding on "} else {"
if (levelMinCurrent > levelNext) {
levelMinCurrent = levelNext;
}
levelNext++;
- } else if (ch == '}' || ch == ']') {
+ } else if (ch == '}' || ch == ']' || ch == ')') {
levelNext--;
}
}