From c0adcee750d176581437eaaa40bc72ed4afaa5f9 Mon Sep 17 00:00:00 2001 From: Colomban Wendling Date: Thu, 3 Mar 2016 17:54:08 +0100 Subject: CPP: Add support for folding on `(` and `)` Feature [feature-requests:#1138]. --- lexers/LexCPP.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lexers') 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--; } } -- cgit v1.2.3