mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-28 17:09:23 +02:00
codetools: indenter: if no examples found, use defaults
git-svn-id: trunk@22861 -
This commit is contained in:
parent
a3eed789e4
commit
5c09cc4e34
@ -1690,7 +1690,20 @@ begin
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
if CheckPolicies(Policies,Result) then exit;
|
if CheckPolicies(Policies,Result) then exit;
|
||||||
|
|
||||||
//GetDefaultIndentPolicy(ParentBlock.Typ,Block.Typ);
|
{$IFDEF VerboseIndenter}
|
||||||
|
DebugLn(['TFullyAutomaticBeautifier.GetIndent no examples found']);
|
||||||
|
{$ENDIF}
|
||||||
|
if SubTypeValid then
|
||||||
|
GetDefaultIndentPolicy(Block.Typ,SubType,Indent)
|
||||||
|
else
|
||||||
|
GetDefaultIndentPolicy(Block.Typ,bbtNone,Indent);
|
||||||
|
if Indent.IndentValid then begin
|
||||||
|
{$IFDEF VerboseIndenter}
|
||||||
|
DebugLn(['TFullyAutomaticBeautifier.GetIndent using default ',Indent.Indent]);
|
||||||
|
{$ENDIF}
|
||||||
|
inc(Indent.Indent,GetLineIndentWithTabs(Source,Block.StartPos,DefaultTabWidth));
|
||||||
|
Result:=true;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TFullyAutomaticBeautifier.GetIndents(const Source: string;
|
function TFullyAutomaticBeautifier.GetIndents(const Source: string;
|
||||||
|
Loading…
Reference in New Issue
Block a user