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.
This commit is contained in:
Ethan Atkins 2020-09-02 21:30:16 -07:00
parent 32c1f0c90a
commit d85f600229
1 changed files with 1 additions and 1 deletions

View File

@ -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 {