mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-14 16:12:41 +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;
|
||||
CursorNode:=FindDeepestNodeAtPos(CleanCursorPos,true);
|
||||
|
||||
if TryComplete(CursorNode, CleanCursorPos, OrigCleanCursorPos) then
|
||||
exit(true);
|
||||
|
||||
{ Find the first occurence of the (local) identifier at cursor in current
|
||||
procedure body and try again. }
|
||||
Result:=TryFirstLocalIdentOccurence(CursorNode,OrigCleanCursorPos,CleanCursorPos);
|
||||
if Result then exit;
|
||||
|
||||
if TryComplete(CursorNode, CleanCursorPos, OrigCleanCursorPos) then exit;
|
||||
if TryFirstLocalIdentOccurence(CursorNode,OrigCleanCursorPos,CleanCursorPos) then
|
||||
exit(true);
|
||||
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TCodeCompletionCodeTool.CompleteCode nothing to complete ... ');
|
||||
|
Loading…
Reference in New Issue
Block a user