Codetools: Restore filtering a completion list in TIdentifierList.Add. Issue #32972.

This commit is contained in:
Juha 2025-03-04 10:13:57 +02:00
parent 6f6df5602b
commit 9dd4b6a97e

View File

@ -965,6 +965,13 @@ procedure TIdentifierList.Add(NewItem: TIdentifierListItem);
var
AnAVLNode: TAVLTreeNode;
begin
if (ilcfDontAllowProcedures in ContextFlags) and (NewItem.GetDesc = ctnProcedure)
and not (NewItem.IsFunction or NewItem.IsConstructor) then
begin // no procedures here
//DebugLn(['TIdentifierList.Add: Skipped "',NewItem.Identifier,'"']);
NewItem.Free;
exit;
end;
AnAVLNode:=FIdentView.FindKey(NewItem,@CompareIdentListItemsForIdents);
if AnAVLNode=nil then begin
if History<>nil then