From 1dbec24d4f23053d0efa1c10ebb7fcafacea5ca4 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Tue, 9 Jun 2009 08:28:55 +0000 Subject: Fix for bug #2802863, Pascal lexer hanging on file that starts with 'interface' after whitespace. --- src/LexPascal.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/LexPascal.cxx b/src/LexPascal.cxx index 371043d94..3dcf35ad5 100644 --- a/src/LexPascal.cxx +++ b/src/LexPascal.cxx @@ -414,7 +414,7 @@ static unsigned int SkipWhiteSpace(unsigned int currentPos, unsigned int endPos, } static void ClassifyPascalWordFoldPoint(int &levelCurrent, int &lineFoldStateCurrent, - unsigned int startPos, unsigned int endPos, + int startPos, unsigned int endPos, unsigned int lastStart, unsigned int currentPos, Accessor &styler) { char s[100]; GetRangeLowered(lastStart, currentPos, styler, s, sizeof(s)); @@ -471,7 +471,7 @@ static void ClassifyPascalWordFoldPoint(int &levelCurrent, int &lineFoldStateCur } else if (strcmp(s, "interface") == 0) { // "interface" keyword requires special handling... bool ignoreKeyword = true; - unsigned int j = lastStart - 1; + int j = lastStart - 1; char ch = styler.SafeGetCharAt(j); while ((j >= startPos) && (IsASpaceOrTab(ch) || ch == '\r' || ch == '\n' || IsStreamCommentStyle(styler.StyleAt(j)))) { -- cgit v1.2.3