diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/LexCPP.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/LexCPP.cxx b/src/LexCPP.cxx index e8462525a..c1bb1ff9a 100644 --- a/src/LexCPP.cxx +++ b/src/LexCPP.cxx @@ -79,13 +79,11 @@ static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, Wo // Handle line continuation generically. if (sc.ch == '\\') { - if (sc.Match("\\\n")) { - sc.Forward(); - continue; - } - if (sc.Match("\\\r\n")) { - sc.Forward(); + if (sc.chNext == '\n' || sc.chNext == '\r') { sc.Forward(); + if (sc.ch == '\r' && sc.chNext == '\n') { + sc.Forward(); + } continue; } } |