This commit is contained in:
Hackerpilot 2015-03-13 14:51:44 -07:00
parent 2410311022
commit 65ae9dd4a0
3 changed files with 17 additions and 2 deletions

View file

@ -1024,8 +1024,9 @@ private:
while (indents.length && isWrapIndent(indents.top))
indents.pop();
indents.push(tok!"{");
if (index == 1 || peekBackIs(tok!":") || peekBackIs(tok!"{")
|| peekBackIs(tok!"}") || peekBackIs(tok!")") || peekBackIs(tok!";"))
if (index == 1 || peekBackIs(tok!":", true) || peekBackIs(tok!"{", true)
|| peekBackIs(tok!"}", true) || peekBackIs(tok!")", true)
|| peekBackIs(tok!";", true))
{
indentLevel = indents.indentSize - 1;
}

7
tests/issue0098.d Normal file
View file

@ -0,0 +1,7 @@
unittest
{
if (!fdmatch)
goto Lfd; // comment
{
}
}

7
tests/issue0098.d.ref Normal file
View file

@ -0,0 +1,7 @@
unittest
{
if (!fdmatch)
goto Lfd; // comment
{
}
}