From ef5b4f4ee4106324df53b6f492dfdca95a5e7a25 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Thu, 25 Jan 2001 23:45:59 +0000 Subject: Patch from Steffen to handle $^W and ${"x"} as scalars. Further change from Neil to avoid whitespace being included in scalars. --- src/LexPerl.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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); -- cgit v1.2.3