diff options
| author | nyamatongwe <unknown> | 2011-08-08 21:06:43 +1000 | 
|---|---|---|
| committer | nyamatongwe <unknown> | 2011-08-08 21:06:43 +1000 | 
| commit | de9e15a24afa38c2107a515da7cc3bb9cc23498d (patch) | |
| tree | a13f0c4beb7a6adf746f3415a083e94f56e3f200 | |
| parent | 89ad0c63a47d193cb81967ad7e98789655a36d68 (diff) | |
| download | scintilla-mirror-de9e15a24afa38c2107a515da7cc3bb9cc23498d.tar.gz | |
More selective for raw string mode. Bug #3388122.
| -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);  				} | 
