Merge pull request #6147 from eatkins/1.4.x-backport-6145

[1.4.x] backport #6145 Print empty newlines with progress
This commit is contained in:
eugene yokota 2020-11-20 23:16:16 -05:00 committed by GitHub
commit c020e0d4f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -111,7 +111,10 @@ private[sbt] final class ProgressState(
if (appendNewline) toWrite ++= lineSeparatorBytes
}
parts.dropRight(1).foreach(appendLine(_, true))
parts.lastOption.foreach(appendLine(_, bytes.endsWith(lineSeparatorBytes)))
parts.lastOption match {
case Some(l) => appendLine(l, bytes.endsWith(lineSeparatorBytes))
case None => toWrite ++= lineSeparatorBytes
}
} else toWrite ++= bytes
toWrite ++= clearScreenBytes
if (endsWithNewLine) {