mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-06 13:00:47 +02:00
jcf: fix indentation for const section in program or library by Bernd Kreuss
git-svn-id: trunk@23721 -
This commit is contained in:
parent
fb089f55fa
commit
f3e0e3abec
@ -110,10 +110,10 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function InGlobalTypeOrVarSection(const pt: TSourceToken): Boolean;
|
||||
function InGlobalTypeOrVarOrConstSection(const pt: TSourceToken): Boolean;
|
||||
begin
|
||||
// are we in a type or var section?
|
||||
if not pt.HasParentNode([nTypeSection, nVarSection]) then
|
||||
if not pt.HasParentNode([nTypeSection, nVarSection, nConstSection]) then
|
||||
begin
|
||||
Result := False;
|
||||
exit;
|
||||
@ -632,7 +632,7 @@ begin
|
||||
begin
|
||||
if pt.HasParentNode([nLibrary, nProgram]) and (liIndentCount >= 1) then
|
||||
begin
|
||||
if not pt.HasParentNode([nExports, nUses]) and (not InGlobalTypeOrVarSection(pt)) then
|
||||
if not pt.HasParentNode([nExports, nUses]) and (not InGlobalTypeOrVarOrConstSection(pt)) then
|
||||
begin
|
||||
if pt.HasParentNode([nCompoundStatement]) and not pt.HasParentNode([nDeclSection]) then
|
||||
begin
|
||||
|
Loading…
Reference in New Issue
Block a user