diff options
author | nyamatongwe <unknown> | 2002-03-26 05:56:41 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2002-03-26 05:56:41 +0000 |
commit | 892db7e3b7c305e91238d72fb6a7b42b421ce313 (patch) | |
tree | ec7ffab0a30311fb89527677f6395bafbca3dc30 /src | |
parent | a811ade7d986bfef8d7070ad89314bdf4ab2e605 (diff) | |
download | scintilla-mirror-892db7e3b7c305e91238d72fb6a7b42b421ce313.tar.gz |
Improved handling of multiline strings which use '\' continuations.
Diffstat (limited to 'src')
-rw-r--r-- | src/LexCPP.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/LexCPP.cxx b/src/LexCPP.cxx index c85664fd5..daf95ea02 100644 --- a/src/LexCPP.cxx +++ b/src/LexCPP.cxx @@ -72,17 +72,20 @@ static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, Wo for (; sc.More(); sc.Forward()) { + if (sc.atLineStart && (sc.state == SCE_C_STRING)) { + // Prevent SCE_C_STRINGEOL from leaking back to previous line + sc.SetState(SCE_C_STRING); + } + // Handle line continuation generically. if (sc.ch == '\\') { if (sc.Match("\\\n")) { sc.Forward(); - sc.Forward(); continue; } if (sc.Match("\\\r\n")) { sc.Forward(); sc.Forward(); - sc.Forward(); continue; } } |