feat: add `dfmt_single_template_constraint_indent`
Signed-off-by: Prajwal S N <prajwalnadig21@gmail.com>
This commit is contained in:
parent
325f093091
commit
864caada43
|
@ -3304,10 +3304,14 @@ extern (C++) class FormatVisitor : SemanticTimeTransitiveVisitor
|
||||||
case TemplateConstraintStyle.conditional_newline_indent:
|
case TemplateConstraintStyle.conditional_newline_indent:
|
||||||
useTempBuf = true;
|
useTempBuf = true;
|
||||||
depth++;
|
depth++;
|
||||||
|
if (config.dfmt_single_template_constraint_indent)
|
||||||
|
depth++;
|
||||||
break;
|
break;
|
||||||
case TemplateConstraintStyle.always_newline_indent:
|
case TemplateConstraintStyle.always_newline_indent:
|
||||||
newline();
|
newline();
|
||||||
depth++;
|
depth++;
|
||||||
|
if (config.dfmt_single_template_constraint_indent)
|
||||||
|
depth++;
|
||||||
break;
|
break;
|
||||||
case TemplateConstraintStyle.conditional_newline:
|
case TemplateConstraintStyle.conditional_newline:
|
||||||
useTempBuf = true;
|
useTempBuf = true;
|
||||||
|
@ -3332,10 +3336,11 @@ extern (C++) class FormatVisitor : SemanticTimeTransitiveVisitor
|
||||||
if (!conditionalNewline())
|
if (!conditionalNewline())
|
||||||
buf.put(' ');
|
buf.put(' ');
|
||||||
writeTempBuf();
|
writeTempBuf();
|
||||||
depth--;
|
goto case;
|
||||||
break;
|
|
||||||
case TemplateConstraintStyle.always_newline_indent:
|
case TemplateConstraintStyle.always_newline_indent:
|
||||||
depth--;
|
depth--;
|
||||||
|
if (config.dfmt_single_template_constraint_indent)
|
||||||
|
depth--;
|
||||||
break;
|
break;
|
||||||
case TemplateConstraintStyle.conditional_newline:
|
case TemplateConstraintStyle.conditional_newline:
|
||||||
if (!conditionalNewline())
|
if (!conditionalNewline())
|
||||||
|
|
Loading…
Reference in New Issue