aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/LexCPP.cxx
diff options
context:
space:
mode:
authornyamatongwe <unknown>2004-10-04 12:05:24 +0000
committernyamatongwe <unknown>2004-10-04 12:05:24 +0000
commit42f56cb42cd34d252b356d646525d9611117f460 (patch)
treee97f31690a0bba02a106d97f1a5ae335e7b56a44 /src/LexCPP.cxx
parent45116cb5f6a63afa7f93a839e710cceea9d9b41f (diff)
downloadscintilla-mirror-42f56cb42cd34d252b356d646525d9611117f460.tar.gz
Patch from Carsten Sperber that colours line ends on comment
and preprocessor lines in STYLE_DEFAULT rather than colouring first byte of line end in line style.
Diffstat (limited to 'src/LexCPP.cxx')
-rw-r--r--src/LexCPP.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/LexCPP.cxx b/src/LexCPP.cxx
index fedb978be..c6ca06505 100644
--- a/src/LexCPP.cxx
+++ b/src/LexCPP.cxx
@@ -123,7 +123,7 @@ static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, Wo
sc.SetState(SCE_C_DEFAULT);
}
} else {
- if ((sc.atLineEnd) || (sc.Match('/', '*')) || (sc.Match('/', '/'))) {
+ if ((sc.ch == '\r') || (sc.ch == '\n') || (sc.Match('/', '*')) || (sc.Match('/', '/'))) {
sc.SetState(SCE_C_DEFAULT);
}
}
@@ -140,7 +140,7 @@ static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, Wo
sc.SetState(SCE_C_COMMENTDOCKEYWORD);
}
} else if (sc.state == SCE_C_COMMENTLINE || sc.state == SCE_C_COMMENTLINEDOC) {
- if (sc.atLineEnd) {
+ if (sc.ch == '\r' || sc.ch == '\n') {
sc.SetState(SCE_C_DEFAULT);
visibleChars = 0;
}
@@ -253,7 +253,7 @@ static void ColouriseCppDoc(unsigned int startPos, int length, int initStyle, Wo
do {
sc.Forward();
} while ((sc.ch == ' ' || sc.ch == '\t') && sc.More());
- if (sc.atLineEnd) {
+ if (sc.ch == '\r' || sc.ch == '\n') {
sc.SetState(SCE_C_DEFAULT);
}
} else if (isoperator(static_cast<char>(sc.ch))) {