Skip to content

Commit

Permalink
display cusor when progress finished.
Browse files Browse the repository at this point in the history
  • Loading branch information
kura-lab committed Oct 14, 2019
1 parent 722ad0e commit 385dee3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bw.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ type BubbleWrap struct {
}

const cursorHide = "\033[?25l"
const cursorShow = "\033[?25h"

func NewBubbleWrap(numbers int) *BubbleWrap {
bw := new(BubbleWrap)
Expand Down Expand Up @@ -110,7 +111,7 @@ func (bw *BubbleWrap) Display() {

// output result
if trunc == 100 {
fmt.Printf("\n\nBubble Wrape finished.\n")
fmt.Printf(cursorShow + "\n\nBubble Wrape finished.\n")
}
}

Expand Down

0 comments on commit 385dee3

Please sign in to comment.