aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/LexOthers.cxx
diff options
context:
space:
mode:
authornyamatongwe <unknown>2002-02-12 10:35:17 +0000
committernyamatongwe <unknown>2002-02-12 10:35:17 +0000
commit9198c2e9fc836bb4b6b5369b5e3877e4574e5bae (patch)
tree3c82f9059fe7001e94745310b8eb4091a0d32bee /src/LexOthers.cxx
parent04bdf3169b2c78aa5bd32af228e777c76f50e1ee (diff)
downloadscintilla-mirror-9198c2e9fc836bb4b6b5369b5e3877e4574e5bae.tar.gz
Minor fixes to lexers.
Diffstat (limited to 'src/LexOthers.cxx')
-rw-r--r--src/LexOthers.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/LexOthers.cxx b/src/LexOthers.cxx
index efc4dafd6..55a30d564 100644
--- a/src/LexOthers.cxx
+++ b/src/LexOthers.cxx
@@ -131,7 +131,7 @@ static void ColouriseBatchDoc(
styler.StartAt(startPos);
styler.StartSegment(startPos);
unsigned int linePos = 0, startLine = startPos;
- for (unsigned int i = startPos; i <= startPos + length; i++) {
+ for (unsigned int i = startPos; i < startPos + length; i++) {
lineBuffer[linePos++] = styler[i];
if (styler[i] == '\r' || styler[i] == '\n' || (linePos >=
sizeof(lineBuffer) - 1)) {
@@ -229,7 +229,7 @@ static void ColourisePropsDoc(unsigned int startPos, int length, int, WordList *
styler.StartAt(startPos);
styler.StartSegment(startPos);
unsigned int linePos = 0, startLine = startPos;
- for (unsigned int i = startPos; i <= startPos + length; i++) {
+ for (unsigned int i = startPos; i < startPos + length; i++) {
lineBuffer[linePos++] = styler[i];
if ((styler[i] == '\r' && styler.SafeGetCharAt(i + 1) != '\n') ||
styler[i] == '\n' ||
@@ -296,9 +296,9 @@ static void ColouriseMakeLine(
i++;
}
if (state == SCE_MAKE_IDENTIFIER) {
- styler.ColourTo(endPos, SCE_MAKE_IDEOL); // Error, variable reference not ended
+ styler.ColourTo(endPos-1, SCE_MAKE_IDEOL); // Error, variable reference not ended
} else {
- styler.ColourTo(endPos, SCE_MAKE_DEFAULT);
+ styler.ColourTo(endPos-1, SCE_MAKE_DEFAULT);
}
}
@@ -307,7 +307,7 @@ static void ColouriseMakeDoc(unsigned int startPos, int length, int, WordList *[
styler.StartAt(startPos);
styler.StartSegment(startPos);
unsigned int linePos = 0, startLine = startPos;
- for (unsigned int i = startPos; i <= startPos + length; i++) {
+ for (unsigned int i = startPos; i < startPos + length; i++) {
lineBuffer[linePos++] = styler[i];
if (styler[i] == '\r' || styler[i] == '\n' || (linePos >= sizeof(lineBuffer) - 1)) {
lineBuffer[linePos] = '\0';
@@ -409,7 +409,7 @@ static void ColouriseErrorListDoc(unsigned int startPos, int length, int, WordLi
styler.StartAt(startPos);
styler.StartSegment(startPos);
unsigned int linePos = 0;
- for (unsigned int i = startPos; i <= startPos + length; i++) {
+ for (unsigned int i = startPos; i < startPos + length; i++) {
lineBuffer[linePos++] = styler[i];
if (styler[i] == '\r' || styler[i] == '\n' || (linePos >= sizeof(lineBuffer) - 1)) {
ColouriseErrorListLine(lineBuffer, linePos, i, styler);