CodeTools: remove circular ref for "keywords in code completion"

This commit is contained in:
Martin 2022-05-03 21:34:26 +02:00
parent 396d171d16
commit 3e2872c0f7
2 changed files with 4 additions and 4 deletions

View File

@ -2518,6 +2518,7 @@ begin
{$ENDIF}
try
FIdentifierListUpdating:=true;
IdentifierList.IdentComplIncludeKeywords := IdentComplIncludeKeywords;
try
Result:=FCurCodeTool.GatherIdentifiers(CursorPos,IdentifierList);
finally

View File

@ -230,6 +230,7 @@ type
TIdentifierList = class
private
FContext: TFindContext;
FIdentComplIncludeKeywords: Boolean;
FNewMemberVisibility: TCodeTreeNodeDesc;
FContextFlags: TIdentifierListContextFlags;
FOnGatherUserIdentifiersToFilteredList: TOnGatherUserIdentifiersToFilteredList;
@ -296,6 +297,7 @@ type
property StartContextPos: TCodeXYPosition
read FStartContextPos write FStartContextPos;
property ContainsFilter: Boolean read FContainsFilter write FContainsFilter;
property IdentComplIncludeKeywords: Boolean read FIdentComplIncludeKeywords write FIdentComplIncludeKeywords;
property OnGatherUserIdentifiersToFilteredList: TOnGatherUserIdentifiersToFilteredList
read FOnGatherUserIdentifiersToFilteredList write FOnGatherUserIdentifiersToFilteredList;
end;
@ -468,9 +470,6 @@ var
implementation
uses
CodeToolManager;
const
CompilerFuncHistoryIndex = 10;
CompilerFuncLevel = 10;
@ -2104,7 +2103,7 @@ begin
ctnBeginBlock,ctnWithStatement,ctnOnStatement:
//ctnInitialization,ctnFinalization: //AllPascalStatements
begin
if CodeToolBoss.IdentComplIncludeKeywords and
if CurrentIdentifierList.IdentComplIncludeKeywords and
(GatherContext.Node <> nil) and
(GatherContext.Node.Desc in [ctnBeginBlock,ctnWithStatement,ctnOnStatement])
then