aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/LexCPP.cxx
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2001-07-23 12:53:05 +0000
committernyamatongwe <devnull@localhost>2001-07-23 12:53:05 +0000
commit2a183f0ea4db1d98cabb5412e4030b6e0b8f4347 (patch)
tree66a22c96a0c9fc5e256ebb0f7cf80fb182e10963 /src/LexCPP.cxx
parent127d6244f912168b5b28ec3b750586440473ed4b (diff)
downloadscintilla-mirror-2a183f0ea4db1d98cabb5412e4030b6e0b8f4347.tar.gz
Patch from Xavier to add fold.compact feature to the C++ lexer.
Defaults to on.
Diffstat (limited to 'src/LexCPP.cxx')
-rw-r--r--src/LexCPP.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/LexCPP.cxx b/src/LexCPP.cxx
index b1824615c..512581807 100644
--- a/src/LexCPP.cxx
+++ b/src/LexCPP.cxx
@@ -331,6 +331,7 @@ static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, Wo
static void FoldCppDoc(unsigned int startPos, int length, int initStyle, WordList *[],
Accessor &styler) {
bool foldComment = styler.GetPropertyInt("fold.comment");
+ bool foldCompact = styler.GetPropertyInt("fold.compact", 1);
unsigned int lengthDoc = startPos + length;
int visibleChars = 0;
int lineCurrent = styler.GetLine(startPos);
@@ -364,7 +365,7 @@ static void FoldCppDoc(unsigned int startPos, int length, int initStyle, WordLis
}
if (atEOL) {
int lev = levelPrev;
- if (visibleChars == 0)
+ if (visibleChars == 0 && foldCompact)
lev |= SC_FOLDLEVELWHITEFLAG;
if ((levelCurrent > levelPrev) && (visibleChars > 0))
lev |= SC_FOLDLEVELHEADERFLAG;