mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-20 12:19:31 +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
|
||||
// gather all proc definitions
|
||||
StartNode:=nil;
|
||||
if (ProcNode.Parent.Desc=ctnImplementation)
|
||||
and (ProcNode.Parent.PriorBrother<>nil)
|
||||
and (ProcNode.Parent.PriorBrother.Desc=ctnInterface) then
|
||||
StartNode:=ProcNode.Parent.PriorBrother.FirstChild;
|
||||
if (ProcNode.Parent.Desc=ctnImplementation) then begin
|
||||
StartNode:=FindInterfaceNode;
|
||||
if StartNode<>nil then
|
||||
StartNode:=StartNode.FirstChild;
|
||||
end;
|
||||
if StartNode=nil then
|
||||
StartNode:=FindFirstNodeOnSameLvl(ProcNode);
|
||||
//debugln(['TCodeCompletionCodeTool.CompleteForwardProcs StartNode=',StartNode.DescAsString,' at ',CleanPosToStr(StartNode.StartPos),'=',ExtractProcName(StartNode,[])]);
|
||||
|
@ -5501,11 +5501,11 @@ begin
|
||||
Result:=Result.PriorBrother;
|
||||
end else begin
|
||||
Result:=Result.Parent;
|
||||
while (Result.Desc in AllCodeSections) and (Result.PriorBrother<>nil) do
|
||||
Result:=Result.PriorBrother;
|
||||
while (Result<>nil) and (Result.FirstChild=nil) do
|
||||
Result:=Result.NextBrother;
|
||||
Result:=Result.FirstChild;
|
||||
if (Result.Desc=ctnImplementation) and (Result.PriorBrother.Desc=ctnInterface)
|
||||
and (Result.PriorBrother.FirstChild<>nil) then
|
||||
Result:=Result.PriorBrother.FirstChild
|
||||
else
|
||||
Result:=Result.FirstChild;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user