From 1cfb20db089b5a225aa48ad2c65ec868863b5d80 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sat, 8 Jun 2002 05:22:08 +0000 Subject: Patch from Philippe to handling line continuation to suit Macintosh format files. --- src/LexCPP.cxx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src') 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; } } -- cgit v1.2.3