From 9dce436839f6e6df327bac824f2e84dc911af869 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Mon, 27 Oct 2003 19:22:07 +0000 Subject: Hang fixed when '/' is first character in file. --- src/LexPerl.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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 || -- cgit v1.2.3