mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 14:38:01 +02:00
Merged revision(s) 51760 #30819f343a from trunk:
codetools: prevent endless loop in TFindDeclarationTool.GetSmartHint. Issue #29754 ........ git-svn-id: branches/fixes_1_6@52120 -
This commit is contained in:
parent
bc5ddac2ed
commit
1458597b9f
@ -3010,10 +3010,11 @@ function TFindDeclarationTool.GetSmartHint(Node: TCodeTreeNode;
|
||||
CTCursorPos: TCodeXYPosition;
|
||||
begin
|
||||
MoveToLastIdentifierThroughDots(ExtTool);
|
||||
if ExtTool.CleanPosToCaret(ExtTool.CurPos.StartPos,CTCursorPos) and
|
||||
ExtTool.FindDeclaration(CTCursorPos,
|
||||
DefaultFindSmartHintFlags+[fsfSearchSourceName],CTExprType,CTXYPos,CTTopLine) and
|
||||
not((CTExprType.Desc=xtContext) and (CTExprType.Context.Node=nil) and (CTExprType.Context.Tool=nil))
|
||||
if ExtTool.CleanPosToCaret(ExtTool.CurPos.StartPos,CTCursorPos)
|
||||
and ExtTool.FindDeclaration(CTCursorPos,
|
||||
DefaultFindSmartHintFlags+[fsfSearchSourceName],CTExprType,CTXYPos,CTTopLine)
|
||||
and not((CTExprType.Desc=xtContext) and (CTExprType.Context.Node=nil) and (CTExprType.Context.Tool=nil))
|
||||
and not((CTExprType.Context.Tool=Self) and (CTXYPos.X=XYPos.X) and (CTXYPos.Y=XYPos.Y)) // prevent endless loop
|
||||
then
|
||||
Result := CTExprType.Context.Tool.GetSmartHint(CTExprType.Context.Node, CTXYPos, False, False)
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user