From 9dd4b6a97eb9e754a66ed45ffac1c615e39f837a Mon Sep 17 00:00:00 2001 From: Juha Date: Tue, 4 Mar 2025 10:13:57 +0200 Subject: [PATCH] Codetools: Restore filtering a completion list in TIdentifierList.Add. Issue #32972. --- components/codetools/identcompletiontool.pas | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/components/codetools/identcompletiontool.pas b/components/codetools/identcompletiontool.pas index 8b9766e6d7..99e55dc2db 100644 --- a/components/codetools/identcompletiontool.pas +++ b/components/codetools/identcompletiontool.pas @@ -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