mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-31 17:20:37 +02:00
MG: fixed find declaration of predefined idents
git-svn-id: trunk@1838 -
This commit is contained in:
parent
7eb7f4d184
commit
b205696671
@ -746,6 +746,7 @@ begin
|
|||||||
Params.ContextNode:=CursorNode;
|
Params.ContextNode:=CursorNode;
|
||||||
Params.SetIdentifier(Self,@Src[CurPos.StartPos],@CheckSrcIdentifier);
|
Params.SetIdentifier(Self,@Src[CurPos.StartPos],@CheckSrcIdentifier);
|
||||||
Params.Flags:=[fdfSearchInParentNodes,fdfExceptionOnNotFound,
|
Params.Flags:=[fdfSearchInParentNodes,fdfExceptionOnNotFound,
|
||||||
|
fdfExceptionOnPredefinedIdent,
|
||||||
fdfTopLvlResolving,fdfSearchInAncestors]
|
fdfTopLvlResolving,fdfSearchInAncestors]
|
||||||
+fdfAllClassVisibilities;
|
+fdfAllClassVisibilities;
|
||||||
if not DirectSearch then begin
|
if not DirectSearch then begin
|
||||||
@ -760,6 +761,12 @@ begin
|
|||||||
Params.ConvertResultCleanPosToCaretPos;
|
Params.ConvertResultCleanPosToCaretPos;
|
||||||
NewPos:=Params.NewPos;
|
NewPos:=Params.NewPos;
|
||||||
NewTopLine:=Params.NewTopLine;
|
NewTopLine:=Params.NewTopLine;
|
||||||
|
if NewPos.Code=nil then begin
|
||||||
|
if Params.IdentifierTool.IsPCharInSrc(Params.Identifier) then
|
||||||
|
Params.IdentifierTool.MoveCursorToCleanPos(Params.Identifier);
|
||||||
|
Params.IdentifierTool.RaiseExceptionFmt(ctsIdentifierNotFound,
|
||||||
|
[GetIdentifier(Params.Identifier)]);
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
finally
|
finally
|
||||||
Params.Free;
|
Params.Free;
|
||||||
@ -1216,7 +1223,10 @@ var
|
|||||||
if not (fdfExceptionOnNotFound in Params.Flags) then exit;
|
if not (fdfExceptionOnNotFound in Params.Flags) then exit;
|
||||||
if (Params.Identifier<>nil)
|
if (Params.Identifier<>nil)
|
||||||
and WordIsPredefinedIdentifier.DoIt(Params.Identifier)
|
and WordIsPredefinedIdentifier.DoIt(Params.Identifier)
|
||||||
and not (fdfExceptionOnPredefinedIdent in Params.Flags) then exit;
|
and not (fdfExceptionOnPredefinedIdent in Params.Flags) then begin
|
||||||
|
Params.SetResult(nil,nil);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
// identifier was not found and exception is wanted
|
// identifier was not found and exception is wanted
|
||||||
// -> raise exception
|
// -> raise exception
|
||||||
if Params.IdentifierTool.IsPCharInSrc(Params.Identifier) then
|
if Params.IdentifierTool.IsPCharInSrc(Params.Identifier) then
|
||||||
@ -1585,7 +1595,6 @@ begin
|
|||||||
AddResultToNodeCaches(FirstSearchedNode,LastSearchedNode,
|
AddResultToNodeCaches(FirstSearchedNode,LastSearchedNode,
|
||||||
fdfSearchForward in Params.Flags,Params,SearchRangeFlags);
|
fdfSearchForward in Params.Flags,Params,SearchRangeFlags);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
CheckResult(false,false);
|
CheckResult(false,false);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user