mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-14 22:32:59 +02:00
codetools: local var completion: always check the identifier at cursor first
git-svn-id: trunk@50053 -
This commit is contained in:
parent
b5bbdbd323
commit
d76225f6d7
@ -9320,12 +9320,13 @@ begin
|
|||||||
CodeCompleteSrcChgCache:=SourceChangeCache;
|
CodeCompleteSrcChgCache:=SourceChangeCache;
|
||||||
CursorNode:=FindDeepestNodeAtPos(CleanCursorPos,true);
|
CursorNode:=FindDeepestNodeAtPos(CleanCursorPos,true);
|
||||||
|
|
||||||
|
if TryComplete(CursorNode, CleanCursorPos, OrigCleanCursorPos) then
|
||||||
|
exit(true);
|
||||||
|
|
||||||
{ Find the first occurence of the (local) identifier at cursor in current
|
{ Find the first occurence of the (local) identifier at cursor in current
|
||||||
procedure body and try again. }
|
procedure body and try again. }
|
||||||
Result:=TryFirstLocalIdentOccurence(CursorNode,OrigCleanCursorPos,CleanCursorPos);
|
if TryFirstLocalIdentOccurence(CursorNode,OrigCleanCursorPos,CleanCursorPos) then
|
||||||
if Result then exit;
|
exit(true);
|
||||||
|
|
||||||
if TryComplete(CursorNode, CleanCursorPos, OrigCleanCursorPos) then exit;
|
|
||||||
|
|
||||||
{$IFDEF CTDEBUG}
|
{$IFDEF CTDEBUG}
|
||||||
DebugLn('TCodeCompletionCodeTool.CompleteCode nothing to complete ... ');
|
DebugLn('TCodeCompletionCodeTool.CompleteCode nothing to complete ... ');
|
||||||
|
Loading…
Reference in New Issue
Block a user