Fix display glitch when sending a single “Done” event with no previous “Working” event ont he same ID

Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
This commit is contained in:
Guillaume Tardif 2021-02-08 17:21:18 +01:00
parent 58e10a7af2
commit ec302a2e10
1 changed files with 3 additions and 0 deletions

View File

@ -84,6 +84,9 @@ func (w *ttyWriter) Event(e Event) {
} else {
e.startTime = time.Now()
e.spinner = newSpinner()
if e.Status == Done || e.Status == Error {
e.stop()
}
w.events[e.ID] = e
}
}