* check symbol name presence before insertion into UnitsCodeCompleteWords

git-svn-id: trunk@6010 -
This commit is contained in:
pierre 2007-01-17 05:32:46 +00:00
parent 6606eac232
commit 60eddddf61

View File

@ -207,7 +207,7 @@ var
end;
Var
st : string;
CIndex : sw_integer;
begin
Inc(level);
if UnitsCodeCompleteWords^.Count=MaxCollectionSize then
@ -215,7 +215,12 @@ var
st:=P^.GetName;
if Length(st)>=CodeCompleteMinLen then
if not ((level=1) and OnlyStandard and (st=UpCaseStr(CodeCompleteUnitName))) then
UnitsCodeCompleteWords^.Insert(NewStr(Lowcasestr(st)));
begin
st:=Lowcasestr(st);
UnitsCodeCompleteWords^.LookUp(st,CIndex);
if CIndex<>-1 then
UnitsCodeCompleteWords^.Insert(NewStr(st));
end;
{ this is wrong because it inserted args or locals of proc
in the globals list !! PM}
if (P^.Items<>nil) and (level=1) and