mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 16:19:28 +02:00
codetools: fixed complete forward proc
git-svn-id: branches/fixes_1_8@56045 -
This commit is contained in:
parent
a821393264
commit
0bc78adca9
@ -1747,10 +1747,11 @@ begin
|
|||||||
try
|
try
|
||||||
// gather all proc definitions
|
// gather all proc definitions
|
||||||
StartNode:=nil;
|
StartNode:=nil;
|
||||||
if (ProcNode.Parent.Desc=ctnImplementation)
|
if (ProcNode.Parent.Desc=ctnImplementation) then begin
|
||||||
and (ProcNode.Parent.PriorBrother<>nil)
|
StartNode:=FindInterfaceNode;
|
||||||
and (ProcNode.Parent.PriorBrother.Desc=ctnInterface) then
|
if StartNode<>nil then
|
||||||
StartNode:=ProcNode.Parent.PriorBrother.FirstChild;
|
StartNode:=StartNode.FirstChild;
|
||||||
|
end;
|
||||||
if StartNode=nil then
|
if StartNode=nil then
|
||||||
StartNode:=FindFirstNodeOnSameLvl(ProcNode);
|
StartNode:=FindFirstNodeOnSameLvl(ProcNode);
|
||||||
//debugln(['TCodeCompletionCodeTool.CompleteForwardProcs StartNode=',StartNode.DescAsString,' at ',CleanPosToStr(StartNode.StartPos),'=',ExtractProcName(StartNode,[])]);
|
//debugln(['TCodeCompletionCodeTool.CompleteForwardProcs StartNode=',StartNode.DescAsString,' at ',CleanPosToStr(StartNode.StartPos),'=',ExtractProcName(StartNode,[])]);
|
||||||
|
@ -5501,10 +5501,10 @@ begin
|
|||||||
Result:=Result.PriorBrother;
|
Result:=Result.PriorBrother;
|
||||||
end else begin
|
end else begin
|
||||||
Result:=Result.Parent;
|
Result:=Result.Parent;
|
||||||
while (Result.Desc in AllCodeSections) and (Result.PriorBrother<>nil) do
|
if (Result.Desc=ctnImplementation) and (Result.PriorBrother.Desc=ctnInterface)
|
||||||
Result:=Result.PriorBrother;
|
and (Result.PriorBrother.FirstChild<>nil) then
|
||||||
while (Result<>nil) and (Result.FirstChild=nil) do
|
Result:=Result.PriorBrother.FirstChild
|
||||||
Result:=Result.NextBrother;
|
else
|
||||||
Result:=Result.FirstChild;
|
Result:=Result.FirstChild;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user