change: add cppCommentEnd state in cpp highlighter

This commit is contained in:
royqh1979@gmail.com 2021-09-20 20:30:09 +08:00
parent 77356215aa
commit 1fc76d50fb
2 changed files with 3 additions and 2 deletions

View File

@ -283,7 +283,7 @@ void SynEditCppHighlighter::ansiCppProc()
} }
mRun+=1; mRun+=1;
} }
mRange.state = RangeState::rsUnknown; mRange.state = RangeState::rsCppCommentEnded;
if (mLine[mRun-1] == '\\' && mLine[mRun]==0) { // continues on next line if (mLine[mRun-1] == '\\' && mLine[mRun]==0) { // continues on next line
mRange.state = RangeState::rsCppComment; mRange.state = RangeState::rsCppComment;
} }

View File

@ -44,7 +44,8 @@ class SynEditCppHighlighter: public SynHighlighter
rsAsmBlock, rsDirective, rsDirectiveComment, rsString, rsAsmBlock, rsDirective, rsDirectiveComment, rsString,
rsMultiLineString, rsMultiLineDirective, rsCppComment, rsMultiLineString, rsMultiLineDirective, rsCppComment,
rsStringEscapeSeq, rsMultiLineStringEscapeSeq, rsStringEscapeSeq, rsMultiLineStringEscapeSeq,
rsRawString, rsSpace,rsRawStringEscaping,rsRawStringNotEscaping,rsChar rsRawString, rsSpace,rsRawStringEscaping,rsRawStringNotEscaping,rsChar,
rsCppCommentEnded
}; };
public: public: