mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 03:19:17 +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
|
begin
|
||||||
if FLineMapCount = AValue then Exit;
|
if FLineMapCount = AValue then Exit;
|
||||||
FLineMapCount := AValue;
|
FLineMapCount := AValue;
|
||||||
SetLength(FLineMap, AValue);
|
if (length(FLineMap) < AValue) or (length(FLineMap) > (AValue+1) * 2) then
|
||||||
|
SetLength(FLineMap, AValue);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSourceLazSynTopInfoView.SetHighlighterTokensLine(ALine: TLineIdx;
|
procedure TSourceLazSynTopInfoView.SetHighlighterTokensLine(ALine: TLineIdx;
|
||||||
@ -1239,7 +1240,7 @@ end;
|
|||||||
|
|
||||||
constructor TSourceLazSynTopInfoView.Create;
|
constructor TSourceLazSynTopInfoView.Create;
|
||||||
begin
|
begin
|
||||||
LineMapCount := 0;
|
ClearLineMap;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSourceLazSynTopInfoView.ClearLineMap;
|
procedure TSourceLazSynTopInfoView.ClearLineMap;
|
||||||
|
Loading…
Reference in New Issue
Block a user