diff options
author | nyamatongwe <devnull@localhost> | 2010-09-15 10:17:05 +1000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2010-09-15 10:17:05 +1000 |
commit | 4c50cd7d4a7d78574e7f49ef20879b4022a5bb08 (patch) | |
tree | f063188d2afd14118e5ed7cde053bf89ee4358e2 | |
parent | 60dc3f3d7456813a45aa02d4edec4cbabe967676 (diff) | |
download | scintilla-mirror-4c50cd7d4a7d78574e7f49ef20879b4022a5bb08.tar.gz |
Fix for bug #3066031 Wrong syntax higlight for broken c++ style comments
-rw-r--r-- | lexers/LexCPP.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lexers/LexCPP.cxx b/lexers/LexCPP.cxx index bbcd0e3aa..bc7bb3702 100644 --- a/lexers/LexCPP.cxx +++ b/lexers/LexCPP.cxx @@ -434,7 +434,9 @@ void SCI_METHOD LexerCPP::Lex(unsigned int startPos, int length, int initStyle, bool isIncludePreprocessor = false; int lineCurrent = styler.GetLine(startPos); - if (initStyle == SCE_C_PREPROCESSOR) { + if ((initStyle == SCE_C_PREPROCESSOR) || + (initStyle == SCE_C_COMMENTLINE) || + (initStyle == SCE_C_COMMENTLINEDOC)) { // Set continuationLine if last character of previous line is '\' if (lineCurrent > 0) { int chBack = styler.SafeGetCharAt(startPos-1, 0); @@ -591,12 +593,12 @@ void SCI_METHOD LexerCPP::Lex(unsigned int startPos, int length, int initStyle, } break; case SCE_C_COMMENTLINE: - if (sc.atLineStart) { + if (sc.atLineStart && !continuationLine) { sc.SetState(SCE_C_DEFAULT|activitySet); } break; case SCE_C_COMMENTLINEDOC: - if (sc.atLineStart) { + if (sc.atLineStart && !continuationLine) { sc.SetState(SCE_C_DEFAULT|activitySet); } else if (sc.ch == '@' || sc.ch == '\\') { // JavaDoc and Doxygen support // Verify that we have the conditions to mark a comment-doc-keyword |