Skip to content

Commit

Permalink
FormatOps: extend slb end past select for keep
Browse files Browse the repository at this point in the history
  • Loading branch information
kitbellew committed Sep 27, 2024
1 parent ca21bf4 commit 9bd4ae9
Showing 1 changed file with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,20 @@ class FormatOps(
}) => null
case _: T.RightBracket if start.left.is[T.RightBracket] => null
case _: T.LeftBracket => null
case _: T.Dot if start.rightOwner.is[Type.Select] => null
case _: T.Ident if start.leftOwner.is[Type.Select] => null
case _: T.Dot => start.rightOwner match {
case _: Type.Select => null
case _: Term.Select
if start.noBreak &&
(style.newlines.getSelectChains eq Newlines.keep) => null
case _ => start
}
case _: T.Ident => start.leftOwner match {
case _: Type.Select => null
case _: Term.Select
if start.noBreak &&
(style.newlines.getSelectChains eq Newlines.keep) => null
case _ => start
}
case t: T.RightParen =>
if (start.left.is[T.LeftParen]) null
else {
Expand Down

0 comments on commit 9bd4ae9

Please sign in to comment.