diff options
author | Mike Lischke <unknown> | 2015-08-21 08:34:06 +1000 |
---|---|---|
committer | Mike Lischke <unknown> | 2015-08-21 08:34:06 +1000 |
commit | 2575ce375ad71f349ef34b93c235f39648b82e6d (patch) | |
tree | 5bee79125909b691e236af26e8968646853c0e68 | |
parent | d7c11303d5eb4ae755b44c0bee911996b983ca6f (diff) | |
download | scintilla-mirror-2575ce375ad71f349ef34b93c235f39648b82e6d.tar.gz |
Fix empty comments /**/ so the comment state does not continue.
-rw-r--r-- | doc/ScintillaHistory.html | 3 | ||||
-rw-r--r-- | lexers/LexMySQL.cxx | 9 |
2 files changed, 9 insertions, 3 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html index 40cf4e898..a4f53154a 100644 --- a/doc/ScintillaHistory.html +++ b/doc/ScintillaHistory.html @@ -501,6 +501,9 @@ <a href="http://sourceforge.net/p/scintilla/bugs/1749/">Bug #1749</a>. </li> <li> + MySql lexer fixes empty comments /**/ so the comment state does not continue. + </li> + <li> VHDL folder supports "protected" keyword. </li> <li> 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); } |