aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/LexPerl.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/LexPerl.cxx b/src/LexPerl.cxx
index d22d90a6a..f5487492a 100644
--- a/src/LexPerl.cxx
+++ b/src/LexPerl.cxx
@@ -288,7 +288,14 @@ static void ColourisePerlDoc(unsigned int startPos, int length, int initStyle,
} else if (ch == '$') {
preferRE = false;
styler.ColourTo(i - 1, state);
- state = SCE_PL_SCALAR;
+ if ((chNext == '{') || isspacechar(chNext)) {
+ styler.ColourTo(i, SCE_PL_SCALAR);
+ } else {
+ state = SCE_PL_SCALAR;
+ i++;
+ ch = chNext;
+ chNext = chNext2;
+ }
} else if (ch == '@') {
preferRE = false;
styler.ColourTo(i - 1, state);