You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consider rendering prefix when pretty printing values in the REPL (#24118)
Previously the initial `val res0: Seq[Int] =` was not considered, so the
pretty-printed value when appended to it could over-run the 100-column
limit of the REPL. This PR properly takes the last line of the prefix
(which can have multiple lines) and passes it to `PPrinter.apply`'s
`initialOffset` so the first line considers the prefix and wraps earlier
as necessary
Tested manually with `Seq.tabulate(22)(identity)`. The single-line
output (below) is 104 characters, exceeding the 100 char default limit.
With this PR, it properly wraps, while without this PR it doesn't, and
you instead need to go all the way up to `Seq.tabulate(27)(identity)`
for it to wrap
```scala
val res0: Seq[Int] = List(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21)
```
0 commit comments