aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/LexPerl.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/LexPerl.cxx b/src/LexPerl.cxx
index 67d60fc1a..6bac381d9 100644
--- a/src/LexPerl.cxx
+++ b/src/LexPerl.cxx
@@ -519,9 +519,13 @@ static void ColourisePerlDoc(unsigned int startPos, int length, int initStyle,
unsigned int fw = i + 1;
while (fw < lengthDoc) {
char fwch = styler.SafeGetCharAt(fw);
- if (isEOLChar(fwch) || isspacechar(fwch))
+ if (fwch == ' ') {
+ if (styler.SafeGetCharAt(fw-1) != '\\' ||
+ styler.SafeGetCharAt(fw-2) != '\\')
break;
- else if (fwch == '>') {
+ } else if (isEOLChar(fwch) || isspacechar(fwch)) {
+ break;
+ } else if (fwch == '>') {
if ((fw - i) == 2 && // '<=>' case
styler.SafeGetCharAt(fw-1) == '=') {
styler.ColourTo(fw, SCE_PL_OPERATOR);