diff --git a/scintilla/lexers/LexSearchResult.cxx b/scintilla/lexers/LexSearchResult.cxx index db4dca70..cfb76608 100644 --- a/scintilla/lexers/LexSearchResult.cxx +++ b/scintilla/lexers/LexSearchResult.cxx @@ -40,7 +40,7 @@ #include "LexerModule.h" // The following definitions are a copy of the ones in FindReplaceDlg.h -static enum { searchHeaderLevel = SC_FOLDLEVELBASE + 1, fileHeaderLevel, resultLevel }; +enum { searchHeaderLevel = SC_FOLDLEVELBASE + 1, fileHeaderLevel, resultLevel }; static inline bool AtEOL(Accessor &styler, unsigned int i) { diff --git a/scintilla/lexers/LexUser.cxx b/scintilla/lexers/LexUser.cxx index 609cb0a2..297cac99 100644 --- a/scintilla/lexers/LexUser.cxx +++ b/scintilla/lexers/LexUser.cxx @@ -1654,7 +1654,7 @@ static void ColouriseUserDoc(unsigned int startPos, int length, int initStyle, W levelNext = levelCurrent; StyleContext sc(startPos, length, initStyle, styler); - for (; finished; dontMove?true:sc.Forward()) + for (; finished; ) { dontMove = false; checkEOL = EOL_DEFAULT_VALUE; @@ -1893,7 +1893,11 @@ static void ColouriseUserDoc(unsigned int startPos, int length, int initStyle, W { int length = iter->length(); if (length == 0) + { + if (!dontMove) + sc.Forward(); continue; + } lineContinuation = true; for (int i=0; i