Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions progressbar.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"net/http"
"os"
"regexp"
"runtime"
"strings"
"sync"
"time"
Expand Down Expand Up @@ -1373,6 +1374,9 @@ func clearProgressBar(c config, s state) error {
// fill the empty content
// to overwrite the progress bar and jump
// back to the beginning of the line
if runtime.GOOS == "windows" {
return writeString(c, "\r")
}
str := fmt.Sprintf("\r%s\r", strings.Repeat(" ", s.maxLineWidth))
return writeString(c, str)
// the following does not show correctly if the previous line is longer than subsequent line
Expand Down