mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-04 03:37:59 +01:00
fixed identifier completion comparing items without nodes
git-svn-id: trunk@8776 -
This commit is contained in:
parent
fcf6f19164
commit
83c73c3f8e
@ -1392,6 +1392,7 @@ begin
|
||||
Result:=0;
|
||||
if Self=CompareItem then exit;
|
||||
if (Node=CompareItem.Node) then exit;
|
||||
if (Node=nil) or (CompareItem.Node=nil) then exit;
|
||||
if (Node.Desc<>ctnProcedure) or (CompareItem.Node.Desc<>ctnProcedure) then
|
||||
exit;
|
||||
{DbgOut('TIdentifierListItem.CompareParamList ',GetIdentifier(Identifier),'=',GetIdentifier(CompareItem.Identifier));
|
||||
|
||||
@ -249,7 +249,12 @@ begin
|
||||
ctnConstDefinition:
|
||||
begin
|
||||
ANode:=IdentItem.Tool.FindTypeNodeOfDefinition(IdentItem.Node);
|
||||
s:=' = '+IdentItem.Tool.ExtractNode(ANode,[]);
|
||||
if ANode<>nil then
|
||||
s:=' = '+IdentItem.Tool.ExtractNode(ANode,[])
|
||||
else begin
|
||||
s:=IdentItem.Tool.ExtractCode(IdentItem.Node.StartPos+length(s),
|
||||
IdentItem.Node.EndPos,[]);
|
||||
end;
|
||||
end;
|
||||
|
||||
else
|
||||
|
||||
Loading…
Reference in New Issue
Block a user