mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-06-01 18:53:28 +02:00
codetools: findreferences: when on proc body search proc interface
git-svn-id: trunk@41133 -
This commit is contained in:
parent
d3fc959f04
commit
186067a9f8
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user