diff --git a/src/dfmt/formatter.d b/src/dfmt/formatter.d index 16eb6edc..2d03b546 100644 --- a/src/dfmt/formatter.d +++ b/src/dfmt/formatter.d @@ -1406,7 +1406,7 @@ private: { pushWrapIndent(); newline(); - if (ufcsWrap) + if (ufcsWrap || onNextLine) regenLineBreakHints(index); } writeToken(); diff --git a/tests/allman/issue0486.d.ref b/tests/allman/issue0486.d.ref new file mode 100644 index 00000000..de7a5403 --- /dev/null +++ b/tests/allman/issue0486.d.ref @@ -0,0 +1,5 @@ +void main() +{ + auto someAutoVariableName = this.firstLink.secondLink + .filter!(shouldBeProbablySomeIdentifierOrNot); +} diff --git a/tests/issue0486.args b/tests/issue0486.args new file mode 100644 index 00000000..7e7e52d0 --- /dev/null +++ b/tests/issue0486.args @@ -0,0 +1 @@ +--keep_line_breaks=true diff --git a/tests/issue0486.d b/tests/issue0486.d new file mode 100644 index 00000000..de7a5403 --- /dev/null +++ b/tests/issue0486.d @@ -0,0 +1,5 @@ +void main() +{ + auto someAutoVariableName = this.firstLink.secondLink + .filter!(shouldBeProbablySomeIdentifierOrNot); +} diff --git a/tests/otbs/issue0486.d.ref b/tests/otbs/issue0486.d.ref new file mode 100644 index 00000000..5f653011 --- /dev/null +++ b/tests/otbs/issue0486.d.ref @@ -0,0 +1,4 @@ +void main() { + auto someAutoVariableName = this.firstLink.secondLink + .filter!(shouldBeProbablySomeIdentifierOrNot); +}