diff --git a/components/codetools/basiccodetools.pas b/components/codetools/basiccodetools.pas index ab60d1a0ae..9f942daa0e 100644 --- a/components/codetools/basiccodetools.pas +++ b/components/codetools/basiccodetools.pas @@ -1371,16 +1371,10 @@ begin Result:=false; if EndPos<1 then exit; if EndPos>length(ASource) then exit; - if ASource[EndPos]='}' then begin - // delphi or codetools comment end - Result:=true; - exit; - end; - if (EndPos>1) and (ASource[EndPos]=')') and (ASource[EndPos-1]='*') then begin - // TP comment end - Result:=true; - exit; - end; + if ASource[EndPos]='}' then + exit(true); // Delphi or codetools comment end + if (EndPos>1) and (ASource[EndPos]=')') and (ASource[EndPos-1]='*') then + exit(true); // TP comment end // test for Delphi comment // // skip line end LineStart:=EndPos; @@ -1398,11 +1392,8 @@ begin while (LineStart<=EndPos) and (ASource[LineStart] in [' ',#9]) do inc(LineStart); if (LineStart