aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <unknown>2000-08-31 09:55:41 +0000
committernyamatongwe <unknown>2000-08-31 09:55:41 +0000
commit3154fa6635c85d09ba9e88972b17aaddd9bc0c9a (patch)
tree6a998a080330c07b16bacb0771965cb40ca29d6d
parent875efc3053b9444de26075b1dbf81787f2a291f3 (diff)
downloadscintilla-mirror-3154fa6635c85d09ba9e88972b17aaddd9bc0c9a.tar.gz
Added some fixes from Steffen to keep ch and chNext synchronised.
-rw-r--r--src/LexPerl.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/LexPerl.cxx b/src/LexPerl.cxx
index 5c6d57ad6..f50e01ed1 100644
--- a/src/LexPerl.cxx
+++ b/src/LexPerl.cxx
@@ -107,7 +107,7 @@ static void ColourisePerlDoc(unsigned int startPos, int length, int initStyle,
state = SCE_PL_DEFAULT;
}
styler.StartAt(startPos);
- char chPrev = ' ';
+ char chPrev = styler.SafeGetCharAt(startPos - 1);
char chNext = styler[startPos];
styler.StartSegment(startPos);
for (int i = startPos; i < lengthDoc; i++) {
@@ -345,8 +345,8 @@ static void ColourisePerlDoc(unsigned int startPos, int length, int initStyle,
styler.ColourTo(i - 1 + 4, state);
i += 4;
state = SCE_PL_DEFAULT;
- chNext = ' ';
- ch = ' ';
+ ch = styler.SafeGetCharAt(i);
+ chNext = styler.SafeGetCharAt(i + 1);
}
}
} else if (state == SCE_PL_SCALAR) {