aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2002-06-08 05:22:08 +0000
committernyamatongwe <devnull@localhost>2002-06-08 05:22:08 +0000
commit1cfb20db089b5a225aa48ad2c65ec868863b5d80 (patch)
tree930811f7b38118435a6680eaf56bbb06b2bb438a
parent1dae15508d0395a92be0497277fbf5abed15e2f9 (diff)
downloadscintilla-mirror-1cfb20db089b5a225aa48ad2c65ec868863b5d80.tar.gz
Patch from Philippe to handling line continuation to suit Macintosh format files.
-rw-r--r--src/LexCPP.cxx10
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;
}
}