mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 15:30:52 +02:00
Jedi code format: Fix identation and bug in commit 8035014eaf
(cherry picked from commit 462eece676
)
This commit is contained in:
parent
f0f492df56
commit
540f2470ab
@ -694,20 +694,19 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// last comments in var, const,... sections belongs to the next procedure/function.
|
// last comments in var, const,... sections belongs to the next procedure/function.
|
||||||
if (pt.TokenType=ttComment) and pt.HasParentNode([nTypeSection,nVarSection,nConstSection,nUses])
|
if (pt.TokenType = ttComment) and pt.HasParentNode([nTypeSection, nVarSection, nConstSection, nUses]) and
|
||||||
and (pt.NextSolidTokenType in ProcedureWords)
|
(pt.NextSolidTokenType in ProcedureWords) and (not pt.HasParentNode(ObjectBodies + [nRecordType]))
|
||||||
and ( not pt.HasParentNode(ObjectBodies + [nRecordType]))
|
//not followed by a blank line.
|
||||||
//not followed by a blank line.
|
and not HasEmptyLineOrDirectiveAfterComments(pt) then
|
||||||
and not HasEmptyLineOrDirectiveAfterComments(pt) then
|
begin
|
||||||
begin
|
Result := 0;
|
||||||
Result:=0;
|
if FormattingSettings.Indent.IndentLibraryProcs then
|
||||||
if FormattingSettings.Indent.IndentLibraryProcs then
|
begin
|
||||||
begin
|
if pt.HasParentNode([nLibrary, nProgram]) and (liIndentCount >= 1) then
|
||||||
if pt.HasParentNode([nLibrary, nProgram]) and (liIndentCount >= 1) then
|
Result := FormattingSettings.Indent.SpacesForIndentLevel(1);
|
||||||
Result:=1;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user