diff options
author | nyamatongwe <devnull@localhost> | 2002-03-26 05:56:41 +0000 |
---|---|---|
committer | nyamatongwe <devnull@localhost> | 2002-03-26 05:56:41 +0000 |
commit | d432b53e3057891fb25eef60ae431d385d67a6f1 (patch) | |
tree | ec7ffab0a30311fb89527677f6395bafbca3dc30 /src | |
parent | 91c22c59aa9d2e027ef9718e265c687689be1efd (diff) | |
download | scintilla-mirror-d432b53e3057891fb25eef60ae431d385d67a6f1.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; } } |