diff options
author | nyamatongwe <unknown> | 2010-09-15 10:17:05 +1000 |
---|---|---|
committer | nyamatongwe <unknown> | 2010-09-15 10:17:05 +1000 |
commit | 1f2a5d4234c7d5855de05095896612200a40cc36 (patch) | |
tree | b30f4a5b0edcc25b6c12efd857197b49a3470826 /lexers/LexCPP.cxx | |
parent | 8f0402d382bf34b074fbda1898321eb3b8851801 (diff) | |
download | scintilla-mirror-1f2a5d4234c7d5855de05095896612200a40cc36.tar.gz |
Fix for bug #3066031 Wrong syntax higlight for broken c++ style comments
Diffstat (limited to 'lexers/LexCPP.cxx')
-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 |