SynEdit: Fixed Matching bracken, for very long lines. Issue #0023517

git-svn-id: trunk@39606 -
This commit is contained in:
martin 2012-12-21 00:09:14 +00:00
parent 650f60c596
commit 0162581c50

View File

@ -8157,6 +8157,10 @@ var
fHighlighter.Next;
i := TokenListCnt;
while not fHighlighter.GetEol do begin
if i >= l then begin
l := l * 4;
SetLength(TokenPosList, l);
end;
TokenPosList[i].X := fHighlighter.GetTokenPos + 1;
TokenPosList[i].Attr := fHighlighter.GetTokenKind;
if TokenPosList[i].X > PosX then begin
@ -8166,10 +8170,6 @@ var
exit;
end;
inc(i);
if i >= l then begin
l := l * 4;
SetLength(TokenPosList, l);
end;
fHighlighter.Next;
end;
MaxKnownTokenPos := Length(Line) + 1; // 1 based end+1 of last token (start pos of none existing after eol token)