mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-21 23:19:29 +02:00
codetools: find declaration on result: jump via result type node
git-svn-id: trunk@30714 -
This commit is contained in:
parent
e770073129
commit
02459ee3e2
@ -6666,7 +6666,7 @@ var
|
||||
// operator: ctnVarDefinition,ctnIdentifier
|
||||
// function: ctnIdentifier
|
||||
ExprType.Desc:=xtContext;
|
||||
ExprType.Context.Node:=ProcNode.FirstChild;
|
||||
ExprType.Context.Node:=ResultNode;
|
||||
exit;
|
||||
end;
|
||||
ResultNode:=ResultNode.NextBrother;
|
||||
@ -10476,8 +10476,6 @@ begin
|
||||
end;
|
||||
|
||||
procedure TFindDeclarationParams.PrettifyResult;
|
||||
var
|
||||
Node: TCodeTreeNode;
|
||||
begin
|
||||
// adjust result for nicer position
|
||||
if (NewNode<>nil) then begin
|
||||
@ -10494,19 +10492,6 @@ begin
|
||||
NewNode:=NewNode.FirstChild;
|
||||
NewCleanPos:=NewNode.StartPos;
|
||||
end;
|
||||
ctnProcedureHead:
|
||||
begin
|
||||
// instead of jumping to the name, jump to the result variable/type
|
||||
Node:=NewNode.FirstChild;
|
||||
while Node<>nil do begin
|
||||
if Node.Desc in [ctnVarDefinition,ctnIdentifier] then begin
|
||||
NewNode:=Node;
|
||||
NewCleanPos:=NewNode.StartPos;
|
||||
break;
|
||||
end;
|
||||
Node:=Node.NextBrother;
|
||||
end;
|
||||
end;
|
||||
ctnGenericType:
|
||||
if (NewNode.FirstChild<>nil) then begin
|
||||
// Instead of jumping to the generic keyword,
|
||||
|
Loading…
Reference in New Issue
Block a user