From 049a847b1cefe16a352aaa80ea9e40f600bb63a5 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Fri, 13 Apr 2001 05:47:39 +0000 Subject: Check for fold flag and don't call Fold method if not set as this avoids checking in the Fold method. --- src/ScintillaBase.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx index 4eb0cf7a0..ad2e97c90 100644 --- a/src/ScintillaBase.cxx +++ b/src/ScintillaBase.cxx @@ -372,8 +372,10 @@ void ScintillaBase::Colourise(int start, int end) { if (lexCurrent) { // Should always succeed as null lexer should always be available lexCurrent->Lex(start, len, styleStart, keyWordLists, styler); styler.Flush(); - lexCurrent->Fold(start, len, styleStart, keyWordLists, styler); - styler.Flush(); + if (styler.GetPropertyInt("fold")) { + lexCurrent->Fold(start, len, styleStart, keyWordLists, styler); + styler.Flush(); + } } } #endif -- cgit v1.2.3