Skip to content

Commit

Permalink
State: relativeToLhsLastLine on same-line comment
Browse files Browse the repository at this point in the history
  • Loading branch information
kitbellew committed Nov 3, 2022
1 parent eb8c1b5 commit 9b51768
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ final case class State(
val tok = tokens(depth)
val right = tok.right
if (allowed.isEmpty) None
else if (right.is[Token.Comment]) Some(right.end)
else if (!isNL && right.is[Token.Comment]) Some(right.end)
else
indentEnd(tok, isNL) {
val earlierState = prev.prevNonCommentSameLine
Expand Down
2 changes: 1 addition & 1 deletion scalafmt-tests/src/test/resources/test/IndentOperator.stat
Original file line number Diff line number Diff line change
Expand Up @@ -4030,5 +4030,5 @@ object A {
}
.map(_.test())

/* Some comment */
/* Some comment */
}

0 comments on commit 9b51768

Please sign in to comment.