diff --git a/cp-bar.go b/cp-bar.go index 39abb38b..774d5d0c 100644 --- a/cp-bar.go +++ b/cp-bar.go @@ -126,9 +126,14 @@ func newCpBar() barSend { cursorUp := fmt.Sprintf("%c[%dA", 27, 1) eraseCurrentLine := fmt.Sprintf("%c[2K\r", 27) cursorDown := fmt.Sprintf("%c[%dB", 27, 1) + firstTime := true bar.Callback = func(s string) { - console.Print(cursorUp) - console.Print(eraseCurrentLine) + if !firstTime { + console.Print(cursorUp) + console.Print(eraseCurrentLine) + } + firstTime = false + console.Bar(barCaption) console.Print(cursorDown)