Skip to content

Commit

Permalink
FormatWriter: implement align.delayUntilSpace
Browse files Browse the repository at this point in the history
  • Loading branch information
kitbellew committed Aug 21, 2023
1 parent 156f03c commit 4c1d272
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ class FormatWriter(formatOps: FormatOps) {

case p: Provided => p.betweenText

case NoSplit =>
case NoSplit if style.align.delayUntilSpace =>
return delayedAlign + currentAlign // RETURNING!

case _ => getIndentation(mod.length + currentAlign + delayedAlign)
Expand Down
8 changes: 4 additions & 4 deletions scalafmt-tests/src/test/resources/align/DefaultWithAlign.stat
Original file line number Diff line number Diff line change
Expand Up @@ -2085,8 +2085,8 @@ object a {
}
>>>
object a {
def meeethod1(pram1: AnyRef): Any = ???
def methd2(paaaaaram2: Any): Any = ???
def meth3(param333333: Any): Any = ???
def md4(param4: Any): Any = ???
def meeethod1(pram1 : AnyRef): Any = ???
def methd2 (paaaaaram2 : Any ): Any = ???
def meth3 (param333333: Any ): Any = ???
def md4 (param4 : Any ): Any = ???
}

0 comments on commit 4c1d272

Please sign in to comment.