diff --git a/ide/codecontextform.pas b/ide/codecontextform.pas index 76b824ac0d..40d9477972 100644 --- a/ide/codecontextform.pas +++ b/ide/codecontextform.pas @@ -973,6 +973,10 @@ procedure TCodeContextFrm.CompleteParameters(DeclCode: string); NewCode:=CodeToolBoss.SourceChangeCache.BeautifyCodeOptions.BeautifyStatement( NewCode,Indent,[],X); NewCode:=copy(NewCode,Indent+1,length(NewCode)); + if NewCode='' then begin + ShowMessage(lisAllParametersOfThisFunctionAreAlreadySetAtThisCall); + exit; + end; // insert ASynEdit.BeginUndoBlock; XY:=Point(X,Y); diff --git a/ide/lazarusidestrconsts.pas b/ide/lazarusidestrconsts.pas index 966bb305b4..a4000b79f6 100644 --- a/ide/lazarusidestrconsts.pas +++ b/ide/lazarusidestrconsts.pas @@ -5086,6 +5086,8 @@ resourcestring lisHideMessageViaDirective = 'Hide message via directive'; lisRemoveLocalVariable2 = 'Remove local variable'; lisNoHints = 'no hints'; + lisAllParametersOfThisFunctionAreAlreadySetAtThisCall = 'All parameters of ' + +'this function are already set at this call. Nothing to add.'; lisToInstallYouMustCompileAndRestartTheIDE = 'To install you must compile ' +'and restart the IDE';