diff options
author | nyamatongwe <unknown> | 2001-07-23 12:53:05 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2001-07-23 12:53:05 +0000 |
commit | 27348b453d965fd16a0b61a03321a54a4ed52b45 (patch) | |
tree | 66a22c96a0c9fc5e256ebb0f7cf80fb182e10963 /src/LexCPP.cxx | |
parent | 4af7edd21563557ad52e7f2004ec46a6fe1344e4 (diff) | |
download | scintilla-mirror-27348b453d965fd16a0b61a03321a54a4ed52b45.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.cxx | 3 |
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; |