From 3154fa6635c85d09ba9e88972b17aaddd9bc0c9a Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Thu, 31 Aug 2000 09:55:41 +0000 Subject: Added some fixes from Steffen to keep ch and chNext synchronised. --- src/LexPerl.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') 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) { -- cgit v1.2.3