mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-15 08:02:51 +02:00
codetools: fixed regression to jump between methods in implementation classes
git-svn-id: trunk@11850 -
This commit is contained in:
parent
be22076c7a
commit
ffc01c88f4
@ -3814,13 +3814,17 @@ function TPascalParserTool.FindFirstNodeOnSameLvl(
|
||||
begin
|
||||
Result:=StartNode;
|
||||
if Result=nil then exit;
|
||||
Result:=Result.Parent;
|
||||
if Result=nil then exit;
|
||||
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.Parent=nil then begin
|
||||
while Result.PriorBrother<>nil do
|
||||
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;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TPascalParserTool.FindNextNodeOnSameLvl(
|
||||
|
@ -1114,17 +1114,21 @@ begin
|
||||
end;
|
||||
end;
|
||||
// next node
|
||||
if (ANode.Desc=ctnTypeSection) and (ANode.FirstChild<>nil) then
|
||||
if (ANode.Desc in [ctnTypeSection]+AllCodeSections)
|
||||
and (ANode.FirstChild<>nil) then
|
||||
ANode:=ANode.FirstChild
|
||||
else if ANode.NextBrother<>nil then
|
||||
ANode:=ANode.NextBrother
|
||||
else begin
|
||||
ANode:=ANode.NextSkipChilds;
|
||||
// skip procs, const and var sections
|
||||
while (ANode<>nil) and (ANode.Desc<>ctnTypeSection) do
|
||||
ANode:=ANode.NextBrother;
|
||||
if ANode<>nil then
|
||||
ANode:=ANode.FirstChild;
|
||||
repeat
|
||||
ANode:=ANode.Parent;
|
||||
if (ANode=nil) then exit;
|
||||
if (not (ANode.Desc in [ctnTypeSection]+AllCodeSections)) then exit;
|
||||
if ANode.NextBrother<>nil then
|
||||
ANode:=ANode.NextBrother;
|
||||
break;
|
||||
until false;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user