aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/LexCPP.cxx
diff options
context:
space:
mode:
authornyamatongwe <unknown>2002-03-26 05:56:41 +0000
committernyamatongwe <unknown>2002-03-26 05:56:41 +0000
commit892db7e3b7c305e91238d72fb6a7b42b421ce313 (patch)
treeec7ffab0a30311fb89527677f6395bafbca3dc30 /src/LexCPP.cxx
parenta811ade7d986bfef8d7070ad89314bdf4ab2e605 (diff)
downloadscintilla-mirror-892db7e3b7c305e91238d72fb6a7b42b421ce313.tar.gz
Improved handling of multiline strings which use '\' continuations.
Diffstat (limited to 'src/LexCPP.cxx')
-rw-r--r--src/LexCPP.cxx7
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;
}
}