ide, codetools: fix jump directly to body (only after implementation). Issue #29730

git-svn-id: trunk@51823 -
This commit is contained in:
ondrej 2016-03-04 13:05:31 +00:00
parent 23f31975f0
commit 636fa40d72

View File

@ -9593,7 +9593,7 @@ var
RevertableJump, JumpToBody, JumpToBodySuccess: boolean;
NewTool: TCodeTool;
NewOrigPos: TCodeXYPosition;
ProcNode: TCodeTreeNode;
ProcNode, ImplementationNode: TCodeTreeNode;
begin
ActiveSrcEdit:=nil;
if not BeginCodeTool(ActiveSrcEdit,ActiveUnitInfo,[]) then exit;
@ -9632,7 +9632,9 @@ begin
if (NewTool.CaretToCleanPos(NewOrigPos, NewCleanPos) = 0) then
begin
ProcNode := NewTool.FindDeepestNodeAtPos(NewCleanPos,False);
ImplementationNode := NewTool.FindImplementationNode;
if (ProcNode<>nil) and (ProcNode.Desc = ctnProcedureHead)
and (ImplementationNode<>nil) and (ProcNode.StartPos<ImplementationNode.StartPos)
and(CodeToolBoss.JumpToMethod(NewSource,
NewX,NewY,BodySource,BodyX,BodyY,BodyTopLine,RevertableJump))
then