diff options
| -rw-r--r-- | lexers/LexBaan.cxx | 10 | 
1 files changed, 6 insertions, 4 deletions
| diff --git a/lexers/LexBaan.cxx b/lexers/LexBaan.cxx index 0de335105..8eab3e8aa 100644 --- a/lexers/LexBaan.cxx +++ b/lexers/LexBaan.cxx @@ -508,7 +508,8 @@ void SCI_METHOD LexerBaan::Lex(Sci_PositionU startPos, Sci_Position length, int  	char word[1000];  	int wordlen = 0; -	std::string preProcessorTags[11] = { "#define", "#elif", "#else", "#endif", +	std::string preProcessorTags[13] = { "#context_off", "#context_on",  +		"#define", "#elif", "#else", "#endif",  		"#ident", "#if", "#ifdef", "#ifndef",  		"#include", "#pragma", "#undef" };  	LexAccessor styler(pAccess); @@ -689,7 +690,7 @@ void SCI_METHOD LexerBaan::Lex(Sci_PositionU startPos, Sci_Position length, int  					word[wordlen++] = sc.ch;  					word[wordlen++] = '\0';  				} -				if (!wordInArray(word, preProcessorTags, 11)) +				if (!wordInArray(word, preProcessorTags, 13))  					// Colorise only preprocessor built in Baan.  					sc.ChangeState(SCE_BAAN_IDENTIFIER);  				if (strcmp(word, "#pragma") == 0 || strcmp(word, "#include") == 0) { @@ -801,9 +802,10 @@ void SCI_METHOD LexerBaan::Fold(Sci_PositionU startPos, Sci_Position length, int  			else if (style == SCE_BAAN_PREPROCESSOR) {  				// folds #ifdef/#if/#ifndef - they are not part of the IsPreProcLine folding.  				if (ch == '#') { -					if (styler.Match(i, "#ifdef") || styler.Match(i, "#if") || styler.Match(i, "#ifndef")) +					if (styler.Match(i, "#ifdef") || styler.Match(i, "#if") || styler.Match(i, "#ifndef") +						|| styler.Match(i, "#context_on"))  						levelCurrent++; -					else if (styler.Match(i, "#endif")) +					else if (styler.Match(i, "#endif") || styler.Match(i, "#context_off"))  						levelCurrent--;  				}  			} | 
