diff options
| author | nyamatongwe <devnull@localhost> | 2011-08-08 21:06:43 +1000 | 
|---|---|---|
| committer | nyamatongwe <devnull@localhost> | 2011-08-08 21:06:43 +1000 | 
| commit | af5c0ff7637b1669c7c75590aa8bcb27d52d28ef (patch) | |
| tree | c82aa6d77d4f159bf7b1339dfbb994bd37a364df /lexers/LexCPP.cxx | |
| parent | 21938a8ea8c456705d09823eb41cce6186276ace (diff) | |
| download | scintilla-mirror-af5c0ff7637b1669c7c75590aa8bcb27d52d28ef.tar.gz | |
More selective for raw string mode. Bug #3388122.
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);  				} | 
