aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/LexCPP.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/LexCPP.cxx')
-rw-r--r--src/LexCPP.cxx22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/LexCPP.cxx b/src/LexCPP.cxx
index 45aa31493..8bed66c3d 100644
--- a/src/LexCPP.cxx
+++ b/src/LexCPP.cxx
@@ -178,16 +178,18 @@ static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, Wo
ColouriseContext cc(startPos, length, initStyle, styler);
for (; cc.More(); cc.Forward()) {
- if (cc.Match("\\\n")) {
- cc.Forward();
- cc.Forward();
- continue;
- }
- if (cc.Match("\\\r\n")) {
- cc.Forward();
- cc.Forward();
- cc.Forward();
- continue;
+ if (cc.ch == '\\') {
+ if (cc.Match("\\\n")) {
+ cc.Forward();
+ cc.Forward();
+ continue;
+ }
+ if (cc.Match("\\\r\n")) {
+ cc.Forward();
+ cc.Forward();
+ cc.Forward();
+ continue;
+ }
}
if (cc.state == SCE_C_OPERATOR) {