codetools: findreferences: when on proc body search proc interface

git-svn-id: trunk@41133 -
This commit is contained in:
mattias 2013-05-11 19:29:04 +00:00
parent d3fc959f04
commit 186067a9f8

View File

@ -1504,6 +1504,15 @@ begin
else
NewNode:=CursorNode;
end;
if (CursorNode.Desc=ctnProcedureHead)
and (NodeIsMethodBody(CursorNode.Parent)) then begin
// if this is a procedure body, try to find the corresponding declaration
NewNode:=FindCorrespondingProcNode(CursorNode.Parent);
if (NewNode<>nil) and (NewNode.StartPos<CursorNode.StartPos) then
CleanCursorPos:=NewNode.StartPos
else
NewNode:=CursorNode;
end;
Result:=JumpToCleanPos(CleanCursorPos,CleanCursorPos,CleanCursorPos,
NewPos,NewTopLine,false);