mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-06 15:47:18 +02:00
codetools: identifier completion: add predefined procs only at statement starts
git-svn-id: trunk@19994 -
This commit is contained in:
parent
1b9d01b147
commit
c8bdd801da
@ -1044,6 +1044,9 @@ const
|
||||
var
|
||||
NewItem: TIdentifierListItem;
|
||||
begin
|
||||
//DebugLn(['AddCompilerProcedure ',AProcName,' ',ilcfStartIsLValue in CurrentIdentifierList.ContextFlags]);
|
||||
if not (ilcfStartIsLValue in CurrentIdentifierList.ContextFlags) then exit;
|
||||
|
||||
NewItem:=TIdentifierListItem.Create(
|
||||
icompUnknown,
|
||||
false,
|
||||
@ -1714,12 +1717,6 @@ begin
|
||||
GatherContext.Tool.FindIdentifierInContext(Params);
|
||||
end;
|
||||
|
||||
// add useful identifiers without context
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TIdentCompletionTool.GatherIdentifiers G');
|
||||
{$ENDIF}
|
||||
GatherUsefulIdentifiers(IdentStartPos,CursorContext,BeautifyCodeOptions);
|
||||
|
||||
// check for incomplete context
|
||||
|
||||
// context bracket level
|
||||
@ -1800,6 +1797,12 @@ begin
|
||||
|
||||
// check for procedure/method declaration context
|
||||
CheckProcedureDeclarationContext;
|
||||
|
||||
// add useful identifiers
|
||||
{$IFDEF CTDEBUG}
|
||||
DebugLn('TIdentCompletionTool.GatherIdentifiers G');
|
||||
{$ENDIF}
|
||||
GatherUsefulIdentifiers(IdentStartPos,CursorContext,BeautifyCodeOptions);
|
||||
end;
|
||||
|
||||
Result:=true;
|
||||
|
Loading…
Reference in New Issue
Block a user