mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-10-26 14:01:46 +01:00
SynEdit: Fixed Matching bracken, for very long lines. Issue #0023517
git-svn-id: trunk@39606 -
This commit is contained in:
parent
650f60c596
commit
0162581c50
@ -8157,6 +8157,10 @@ var
|
|||||||
fHighlighter.Next;
|
fHighlighter.Next;
|
||||||
i := TokenListCnt;
|
i := TokenListCnt;
|
||||||
while not fHighlighter.GetEol do begin
|
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].X := fHighlighter.GetTokenPos + 1;
|
||||||
TokenPosList[i].Attr := fHighlighter.GetTokenKind;
|
TokenPosList[i].Attr := fHighlighter.GetTokenKind;
|
||||||
if TokenPosList[i].X > PosX then begin
|
if TokenPosList[i].X > PosX then begin
|
||||||
@ -8166,10 +8170,6 @@ var
|
|||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
inc(i);
|
inc(i);
|
||||||
if i >= l then begin
|
|
||||||
l := l * 4;
|
|
||||||
SetLength(TokenPosList, l);
|
|
||||||
end;
|
|
||||||
fHighlighter.Next;
|
fHighlighter.Next;
|
||||||
end;
|
end;
|
||||||
MaxKnownTokenPos := Length(Line) + 1; // 1 based end+1 of last token (start pos of none existing after eol token)
|
MaxKnownTokenPos := Length(Line) + 1; // 1 based end+1 of last token (start pos of none existing after eol token)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user