From d85f6002293c8ec17e0ad8cdbae6d4a0d3e809c3 Mon Sep 17 00:00:00 2001 From: Ethan Atkins Date: Wed, 2 Sep 2020 21:30:16 -0700 Subject: [PATCH] Improve progress display with limit + 1 tasks When the number of tasks running exceeds the limit for the number of progress tasks to display by 1. Say the limit is 2 and there are three tasks running, then we display | ... (1 other tasks) | => foo 2s | => bar 3s This looks bad considering we could just display what the task actually is. --- .../src/main/scala/sbt/internal/util/ProgressState.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/util-logging/src/main/scala/sbt/internal/util/ProgressState.scala b/internal/util-logging/src/main/scala/sbt/internal/util/ProgressState.scala index f9e8e7fdb..40be950ba 100644 --- a/internal/util-logging/src/main/scala/sbt/internal/util/ProgressState.scala +++ b/internal/util-logging/src/main/scala/sbt/internal/util/ProgressState.scala @@ -171,7 +171,7 @@ private[sbt] object ProgressState { s" | => ${item.name} ${elapsed}s" } val limit = state.maxItems - if (base.size > limit) + if (base.size > limit + 1) s" | ... (${base.size - limit} other tasks)" +: base.takeRight(limit) else base } else {