Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed #352 #409

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions area_printer.go
Expand Up @@ -97,6 +97,9 @@ func (p *AreaPrinter) Start(text ...interface{}) (*AreaPrinter, error) {
// Stop terminates the AreaPrinter immediately.
// The AreaPrinter will not resolve into anything.
func (p *AreaPrinter) Stop() error {
if !p.isActive {
return nil
}
p.isActive = false
if p.RemoveWhenDone {
p.Clear()
Expand Down
2 changes: 1 addition & 1 deletion progressbar_printer.go
Expand Up @@ -164,7 +164,7 @@ func (p *ProgressbarPrinter) Increment() *ProgressbarPrinter {
return p
}

// This method changed the title and re-renders the progressbar
// UpdateTitle updates the title and re-renders the progressbar
func (p *ProgressbarPrinter) UpdateTitle(title string) *ProgressbarPrinter {
p.Title = title
p.updateProgress()
Expand Down
3 changes: 3 additions & 0 deletions spinner_printer.go
Expand Up @@ -161,6 +161,9 @@ func (s SpinnerPrinter) Start(text ...interface{}) (*SpinnerPrinter, error) {
// Stop terminates the SpinnerPrinter immediately.
// The SpinnerPrinter will not resolve into anything.
func (s *SpinnerPrinter) Stop() error {
if !s.IsActive {
return nil
}
s.IsActive = false
if s.RemoveWhenDone {
fClearLine(s.Writer)
Expand Down