mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 17:19:22 +02:00
IDE, SourceEditor: TopLineInfoHint, reduce amount of memory re-allocs
(cherry picked from commit 0f830698c0
)
This commit is contained in:
parent
2906c4f8d1
commit
962f05f665
@ -1201,7 +1201,8 @@ procedure TSourceLazSynTopInfoView.SetLineMapCount(AValue: integer);
|
||||
begin
|
||||
if FLineMapCount = AValue then Exit;
|
||||
FLineMapCount := AValue;
|
||||
SetLength(FLineMap, AValue);
|
||||
if (length(FLineMap) < AValue) or (length(FLineMap) > (AValue+1) * 2) then
|
||||
SetLength(FLineMap, AValue);
|
||||
end;
|
||||
|
||||
procedure TSourceLazSynTopInfoView.SetHighlighterTokensLine(ALine: TLineIdx;
|
||||
@ -1239,7 +1240,7 @@ end;
|
||||
|
||||
constructor TSourceLazSynTopInfoView.Create;
|
||||
begin
|
||||
LineMapCount := 0;
|
||||
ClearLineMap;
|
||||
end;
|
||||
|
||||
procedure TSourceLazSynTopInfoView.ClearLineMap;
|
||||
|
Loading…
Reference in New Issue
Block a user