synedit: accelerated TSynPasSyn.BorProc

git-svn-id: trunk@25729 -
This commit is contained in:
mattias 2010-05-28 16:01:09 +00:00
parent 488fd1f726
commit f2ab7eb0e6

View File

@ -2145,18 +2145,21 @@ begin
end; end;
procedure TSynPasSyn.BorProc; procedure TSynPasSyn.BorProc;
var
p: LongInt;
begin begin
{$IFDEF SYN_LAZARUS} {$IFDEF SYN_LAZARUS}
p:=Run;
fTokenID := tkComment; fTokenID := tkComment;
repeat repeat
case fLine[Run] of case fLine[p] of
#0: break; #0,#10,#13: break;
'}': '}':
if TopPascalCodeFoldBlockType=cfbtNestedComment then if TopPascalCodeFoldBlockType=cfbtNestedComment then
EndPascalCodeFoldBlock EndPascalCodeFoldBlock
else begin else begin
fRange := fRange - [rsBor]; fRange := fRange - [rsBor];
Inc(Run); Inc(p);
break; break;
end; end;
'{': '{':
@ -2165,8 +2168,9 @@ begin
StartPascalCodeFoldBlock(cfbtNestedComment); StartPascalCodeFoldBlock(cfbtNestedComment);
end; end;
end; end;
Inc(Run); Inc(p);
until (Run>=fLineLen) or (fLine[Run] in [#0, #10, #13]); until (p>=fLineLen);
Run:=p;
{$ELSE} {$ELSE}
case fLine[Run] of case fLine[Run] of
#0: NullProc; #0: NullProc;