This commit is contained in:
Hackerpilot 2016-01-22 18:48:36 -08:00
parent 268657831b
commit e2d23726b9
4 changed files with 20 additions and 0 deletions

View file

@ -364,6 +364,9 @@ private:
immutable canAddNewline = currTokenLine - prevTokenEndLine < 1;
if (peekBackIsOperator() && !isSeparationToken(t))
pushWrapIndent(t);
else if (peekBackIs(tok!",") && prevTokenEndLine == currTokenLine
&& indents.indentToMostRecent(tok!"enum") == -1)
pushWrapIndent(tok!",");
if (peekBackIsOperator() && !peekBackIsOneOf(false, tok!"comment",
tok!"{", tok!"}", tok!":", tok!";", tok!",", tok!"[", tok!"(")
&& !canAddNewline && prevTokenEndLine < currTokenLine)

View file

@ -0,0 +1,6 @@
unittest
{
int a, /// comment
b, /// comment
c; /// comment
}

6
tests/issue0224.d Normal file
View file

@ -0,0 +1,6 @@
unittest
{
int a, /// comment
b, /// comment
c; /// comment
}

View file

@ -0,0 +1,5 @@
unittest {
int a, /// comment
b, /// comment
c; /// comment
}