From dd401f1379f34c0ae6c8c73c3ffbba2871d7fb95 Mon Sep 17 00:00:00 2001 From: ssk97 Date: Tue, 6 Jun 2017 14:12:28 -0700 Subject: [PATCH] Fix folding in user-defined languages for non-windows line endings Close #3372, fix #2873 --- scintilla/lexers/LexUser.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scintilla/lexers/LexUser.cxx b/scintilla/lexers/LexUser.cxx index 33e29f67..5233257d 100644 --- a/scintilla/lexers/LexUser.cxx +++ b/scintilla/lexers/LexUser.cxx @@ -2081,6 +2081,8 @@ static void ColouriseUserDoc(Sci_PositionU startPos, Sci_Position length, int in // no closing sequence, start over from default sc.SetState(SCE_USER_STYLE_IDENTIFIER); dontMove = true; + if (sc.atLineEnd) + checkEOL = EOL_SKIP_CHECK; break; } } @@ -2125,7 +2127,7 @@ static void ColouriseUserDoc(Sci_PositionU startPos, Sci_Position length, int in sc.SetState(SCE_USER_STYLE_IDENTIFIER); dontMove = true; if (sc.atLineEnd) - checkEOL = true; + checkEOL = EOL_SKIP_CHECK; levelNext--; if (levelMinCurrent > levelNext) @@ -2150,7 +2152,7 @@ static void ColouriseUserDoc(Sci_PositionU startPos, Sci_Position length, int in // no closing sequence, start over from default sc.SetState(SCE_USER_STYLE_IDENTIFIER); if (sc.atLineEnd) - checkEOL = true; + checkEOL = EOL_SKIP_CHECK; dontMove = true; levelNext--;