mirror of
https://github.com/restic/restic.git
synced 2026-10-08 11:27:12 +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:
1 parent
8e27a934de
commit
aedead2823
5 files changed
+13
-7
No files matched your search
@@ -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