aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/LexPerl.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/LexPerl.cxx')
-rw-r--r--src/LexPerl.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/LexPerl.cxx b/src/LexPerl.cxx
index b3709fb6c..16a068778 100644
--- a/src/LexPerl.cxx
+++ b/src/LexPerl.cxx
@@ -383,7 +383,7 @@ static void ColourisePerlDoc(unsigned int startPos, int length, int initStyle,
// any slash found, so no longer need to track preferRE state.
// Find first previous significant lexed element and interpret.
bool preferRE = false;
- unsigned int bk = i - 1;
+ unsigned int bk = (i > 0)? i - 1: 0;
char bkch;
styler.Flush();
while ((bk > 0) && (styler.StyleAt(bk) == SCE_PL_DEFAULT ||