mirror of
https://github.com/restic/restic.git
synced 2025-10-20 18:48:36 +00:00
ui/termstatus: fix clearing status lines
To clear the status lines, they should be set to an empty array to prevent future updates of those lines. Setting the status lines to an array containing an empty string is wrong as this causes the output to continuously add that empty status line after each message.
This commit is contained in:
@@ -53,7 +53,7 @@ func newGenericProgressMax(show bool, max uint64, description string, print func
|
||||
func newTerminalProgressMax(show bool, max uint64, description string, term *termstatus.Terminal) *progress.Counter {
|
||||
return newGenericProgressMax(show, max, description, func(status string, final bool) {
|
||||
if final {
|
||||
term.SetStatus([]string{})
|
||||
term.SetStatus(nil)
|
||||
term.Print(status)
|
||||
} else {
|
||||
term.SetStatus([]string{status})
|
||||
|
Reference in New Issue
Block a user