From 840401c70140946bb26387b1acb6e22f6bdf1659 Mon Sep 17 00:00:00 2001 From: zufuliu Date: Mon, 16 Dec 2024 18:17:20 +0800 Subject: [PATCH] Fix Pascal asm block highlighting. See https://github.com/ScintillaOrg/lexilla/issues/295 --- scintilla/lexers/LexPascal.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scintilla/lexers/LexPascal.cxx b/scintilla/lexers/LexPascal.cxx index 46a13bf666..4b706afac3 100644 --- a/scintilla/lexers/LexPascal.cxx +++ b/scintilla/lexers/LexPascal.cxx @@ -117,11 +117,6 @@ void ColourisePascalDoc(Sci_PositionU startPos, Sci_Position length, int initSty } for (; sc.More(); sc.Forward()) { - if (sc.atLineEnd) { - // Update the line state, so it can be seen by next line - styler.SetLineState(sc.currentLine, curLineState); - } - // Determine if the current state should terminate. switch (sc.state) { case SCE_PAS_NUMBER: @@ -228,6 +223,11 @@ void ColourisePascalDoc(Sci_PositionU startPos, Sci_Position length, int initSty sc.SetState(SCE_PAS_ASM); } } + + if (sc.atLineEnd) { + // Update the line state, so it can be seen by next line + styler.SetLineState(sc.currentLine, curLineState); + } } if (sc.state == SCE_PAS_IDENTIFIER && IsIdentifierCharEx(sc.chPrev)) {