From ff0b740c49e8f1644879eb111816410246a93b78 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Mon, 20 May 2002 07:44:39 +0000 Subject: Fold #if as well as #region but require fold.preprocessor property to be set to allow folding preprocessor directives. --- src/LexCPP.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/LexCPP.cxx b/src/LexCPP.cxx index 85dcd42e8..e8462525a 100644 --- a/src/LexCPP.cxx +++ b/src/LexCPP.cxx @@ -273,6 +273,7 @@ static bool IsStreamCommentStyle(int style) { static void FoldCppDoc(unsigned int startPos, int length, int initStyle, WordList *[], Accessor &styler) { bool foldComment = styler.GetPropertyInt("fold.comment") != 0; + bool foldPreprocessor = styler.GetPropertyInt("fold.preprocessor") != 0; bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0; unsigned int endPos = startPos + length; int visibleChars = 0; @@ -307,15 +308,15 @@ static void FoldCppDoc(unsigned int startPos, int length, int initStyle, WordLis } } } - if (style == SCE_C_PREPROCESSOR) { + if (foldPreprocessor && (style == SCE_C_PREPROCESSOR)) { if (ch == '#') { unsigned int j=i+1; while ((j