mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 21:42:51 +02:00
codetools: added option to not search for overloads when cursor on definition
git-svn-id: trunk@20262 -
This commit is contained in:
parent
cd986dfe6c
commit
f23aae7dab
@ -531,7 +531,8 @@ type
|
|||||||
|
|
||||||
TFindDeclarationListFlag = (
|
TFindDeclarationListFlag = (
|
||||||
fdlfWithoutEmptyProperties, // omit properties without type and attributes
|
fdlfWithoutEmptyProperties, // omit properties without type and attributes
|
||||||
fdlfWithoutForwards // omit foward classes and procedures
|
fdlfWithoutForwards, // omit foward classes and procedures
|
||||||
|
fdlfIfStartIsDefinitionStop // omit overloads when start is a definition
|
||||||
);
|
);
|
||||||
TFindDeclarationListFlags = set of TFindDeclarationListFlag;
|
TFindDeclarationListFlags = set of TFindDeclarationListFlag;
|
||||||
|
|
||||||
@ -3551,6 +3552,7 @@ var
|
|||||||
OldPositions: TFPList;
|
OldPositions: TFPList;
|
||||||
NodeList: TFPList;
|
NodeList: TFPList;
|
||||||
CleanPos: integer;
|
CleanPos: integer;
|
||||||
|
AtDefinition: Boolean;
|
||||||
|
|
||||||
procedure AddPos;
|
procedure AddPos;
|
||||||
begin
|
begin
|
||||||
@ -3606,8 +3608,11 @@ begin
|
|||||||
NewTool:=Self;
|
NewTool:=Self;
|
||||||
NewNode:=BuildSubTreeAndFindDeepestNodeAtPos(CleanPos,true);
|
NewNode:=BuildSubTreeAndFindDeepestNodeAtPos(CleanPos,true);
|
||||||
NewPos:=CursorPos;
|
NewPos:=CursorPos;
|
||||||
if StartPositionAtDefinition then
|
AtDefinition:=StartPositionAtDefinition;
|
||||||
|
if AtDefinition then begin
|
||||||
AddPos;
|
AddPos;
|
||||||
|
if fdlfIfStartIsDefinitionStop in Flags then exit;
|
||||||
|
end;
|
||||||
|
|
||||||
CurCursorPos:=CursorPos;
|
CurCursorPos:=CursorPos;
|
||||||
CurTool:=Self;
|
CurTool:=Self;
|
||||||
|
Loading…
Reference in New Issue
Block a user