From 2575ce375ad71f349ef34b93c235f39648b82e6d Mon Sep 17 00:00:00 2001 From: Mike Lischke Date: Fri, 21 Aug 2015 08:34:06 +1000 Subject: Fix empty comments /**/ so the comment state does not continue. --- lexers/LexMySQL.cxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'lexers/LexMySQL.cxx') diff --git a/lexers/LexMySQL.cxx b/lexers/LexMySQL.cxx index dceec4734..951c3e3c3 100644 --- a/lexers/LexMySQL.cxx +++ b/lexers/LexMySQL.cxx @@ -267,10 +267,13 @@ static void ColouriseMySQLDoc(Sci_PositionU startPos, Sci_Position length, int i { sc.SetState(SCE_MYSQL_COMMENT | activeState); - // Skip comment introducer and check for hidden command. - sc.Forward(2); - if (sc.ch == '!') + // Skip first char of comment introducer and check for hidden command. + // The second char is skipped by the outer loop. + sc.Forward(); + if (sc.GetRelativeCharacter(1) == '!') { + // Version comment found. Skip * now. + sc.Forward(); activeState = HIDDENCOMMAND_STATE; sc.ChangeState(SCE_MYSQL_HIDDENCOMMAND); } -- cgit v1.2.3