diff options
author | nyamatongwe <unknown> | 2011-09-09 16:59:38 +1000 |
---|---|---|
committer | nyamatongwe <unknown> | 2011-09-09 16:59:38 +1000 |
commit | c4e2263b026a0b5aa67c421b767c3ebbabda654f (patch) | |
tree | a81b91816ba7a5b16ad676ba3a2776e99a3316af /lexers/LexCPP.cxx | |
parent | 9f1e13f587c8c3221a99cd2beee90242c32862fc (diff) | |
parent | 9b4a855ed7962ce5da8c3e538a38f3eb396a8cc7 (diff) | |
download | scintilla-mirror-c4e2263b026a0b5aa67c421b767c3ebbabda654f.tar.gz |
Merge with main repository.
Diffstat (limited to 'lexers/LexCPP.cxx')
-rw-r--r-- | lexers/LexCPP.cxx | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/lexers/LexCPP.cxx b/lexers/LexCPP.cxx index 22477c32f..51fd19255 100644 --- a/lexers/LexCPP.cxx +++ b/lexers/LexCPP.cxx @@ -803,15 +803,20 @@ void SCI_METHOD LexerCPP::Lex(unsigned int startPos, int length, int initStyle, sc.SetState(SCE_C_REGEX|activitySet); // JavaScript's RegEx } else if (sc.ch == '\"') { if (sc.chPrev == 'R') { - sc.SetState(SCE_C_STRINGRAW|activitySet); - rawStringTerminator = ")"; - for (int termPos = sc.currentPos + 1;; termPos++) { - char chTerminator = styler.SafeGetCharAt(termPos, '('); - if (chTerminator == '(') - break; - rawStringTerminator += chTerminator; + styler.Flush(); + if (MaskActive(styler.StyleAt(sc.currentPos - 1)) == SCE_C_STRINGRAW) { + sc.SetState(SCE_C_STRINGRAW|activitySet); + rawStringTerminator = ")"; + for (int termPos = sc.currentPos + 1;; termPos++) { + char chTerminator = styler.SafeGetCharAt(termPos, '('); + if (chTerminator == '(') + break; + rawStringTerminator += chTerminator; + } + rawStringTerminator += '\"'; + } else { + sc.SetState(SCE_C_STRING|activitySet); } - rawStringTerminator += '\"'; } else { sc.SetState(SCE_C_STRING|activitySet); } |