aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--lexers/LexCPP.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/lexers/LexCPP.cxx b/lexers/LexCPP.cxx
index 68859ec3b..8b0263a6e 100644
--- a/lexers/LexCPP.cxx
+++ b/lexers/LexCPP.cxx
@@ -485,10 +485,10 @@ void SCI_METHOD LexerCPP::Lex(unsigned int startPos, int length, int initStyle,
for (; sc.More(); sc.Forward()) {
if (sc.atLineStart) {
- if (sc.state == SCE_C_STRING) {
+ if ((sc.state == SCE_C_STRING) || (sc.state == SCE_C_CHARACTER)) {
// Prevent SCE_C_STRINGEOL from leaking back to previous line which
// ends with a line continuation by locking in the state upto this position.
- sc.SetState(SCE_C_STRING);
+ sc.SetState(sc.state);
}
// Reset states to begining of colourise so no surprises
// if different sets of lines lexed.