Skip to content

Commit

Permalink
FormatOps: use optimal slb end in binpacked (...
Browse files Browse the repository at this point in the history
  • Loading branch information
kitbellew committed Oct 2, 2024
1 parent 860c1b9 commit c988f8c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1057,9 +1057,10 @@ class FormatOps(
}
val noSyntaxNL = extendsThenWith
val pnlPolicy = PenalizeAllNewlines(lastToken, 1, noSyntaxNL = noSyntaxNL)
val slbEnd = endOfSingleLineBlock(lastFt)
Seq(
Split(Space, 0)
.withSingleLine(lastToken, exclude = exclude, noSyntaxNL = noSyntaxNL)
.withSingleLine(slbEnd, exclude = exclude, noSyntaxNL = noSyntaxNL)
.orPolicy(pnlPolicy).withIndent(indent),
Split(nlMod, 0).onlyIf(nlOnelineTag != Right(false))
.preActivateFor(nlOnelineTag.left.toOption)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7371,6 +7371,5 @@ object Parsers:
>>>
object Parsers:
enum Location(inArgs: Boolean):
case InPatternArgs
extends Location(false, true,
case InPatternArgs extends Location(false, true,
true) // InParens not true, since it might be an alternative

0 comments on commit c988f8c

Please sign in to comment.