Skip to content

Trailing residual characters #124

@NathanBaulch

Description

@NathanBaulch

I occasionally see residual junk after my progress bar in situations when the total width decreases. This can happen when the description shrinks or when the timestamp wraps around (eg 1m59s -> 2m0s), but only when running in non-full width + ANSI code mode.

bar := progressbar.NewOptions64(10, progressbar.OptionSetDescription("lengthy"), progressbar.OptionUseANSICodes(true))
bar.Add(1)
bar.Describe("brief")
bar.Add(1)
// Output:
// brief   1% |                                        |  [0s:0s]s]
//                                                               ^^

It looks like this is a regression introduced in commit df9a997f0a and released in v3.7.3.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions