diff --git a/components/codetools/identcompletiontool.pas b/components/codetools/identcompletiontool.pas index 2dd76aef6f..08822b2291 100644 --- a/components/codetools/identcompletiontool.pas +++ b/components/codetools/identcompletiontool.pas @@ -2120,7 +2120,6 @@ begin begin // check if a semicolon is needed at the end if (not (ilcfNoEndSemicolon in CurrentIdentifierList.ContextFlags)) - and (not (ilcfStartOfStatement in CurrentIdentifierList.ContextFlags)) then begin // check if a semicolon is needed at the end if (CurPos.Flag in [cafEnd]) diff --git a/ide/sourceeditprocs.pas b/ide/sourceeditprocs.pas index 598b35d01a..aebec536cd 100644 --- a/ide/sourceeditprocs.pas +++ b/ide/sourceeditprocs.pas @@ -650,6 +650,7 @@ begin end; // add semicolon for statement ends + //debugln(['GetIdentCompletionValue CanAddSemicolon=',CanAddSemicolon,' ilcfNoEndSemicolon=',ilcfNoEndSemicolon in IdentList.ContextFlags,' ']); if CanAddSemicolon and (not (ilcfNoEndSemicolon in IdentList.ContextFlags)) then begin @@ -660,8 +661,8 @@ begin Result:=Result+';'; if (CursorToLeft=0) and (IdentItem.GetDesc=ctnProcedure) and (not IdentItem.IsFunction) then begin - // a procedure call without paramters - // put cursor behind semicolon + // a procedure call without parameters + // => put cursor behind semicolon end else begin // keep cursor in front of semicolon inc(CursorToLeft);