Skip to content

Progress bar UI corruption with .set_move_cursor() #4808

Closed
console-rs/indicatif
#790

Description

@rami3l

Sometimes this will happen on my Mac (macOS v26, Ghostty v1.3, fish v4.6):

Image

Note that:

  • Ideally the progress bar should be cleaned up after the "installed" message appears (see the final line).
  • Ideally the progress bar should update normally even when the input shortens (see the second line and the second-to-last line).

I'm pretty sure this surfaced after #4786, otherwise we actually haven't changed much about the progress bar (modulo the extra alignment #4768 but should be irrelevant).

I would like to know if anyone else has experienced this and esp. @ChrisDenton if you have seen anything broken on Windows since.

Activity

  1. ChrisDenton commented on Apr 12, 2026

    @ChrisDenton
    Member

    I can repo, The problem seems to be that indicatif doesn't clear the rest of the line after printing. The underlying console crate it uses doesn't seem to provide this feature either. EDIT: actually it does! But it's not obvious: .clear_chars(0) does what we want.

    The fix would be to add something like a clear_to_end_of_line to the console crate (which emits \e[0K) and then use that in indicatif. I'll see if I can do this once I have a moment, unless someone else beats me to it.

  2. changed the title [-]Possible UI corruption with `.set_move_cursor()`[/-] [+]Progress bar UI corruption with `.set_move_cursor()`[/+] on Apr 12, 2026
  3. rami3l commented on Apr 14, 2026

    @rami3l
    MemberAuthor

    @ChrisDenton Thank you so much for looking into this!

    That said, I'm surprised that the "fix" magic description now works across repos. On my side it might be interesting to keep it open until the version is bumped, otherwise it might feel a bit confusing 🙏

  4. reopened this on Apr 14, 2026
  5. added
    forwardedThis issue as been forwarded "upstream"
    on Apr 14, 2026
  6. ChrisDenton commented on Apr 14, 2026

    @ChrisDenton
    Member

    Sorry, that close wasn't intentional. I didn't consider that the auto-close behaviour would trigger across repos

  7. rami3l commented on Apr 14, 2026

    @rami3l
    MemberAuthor

    @ChrisDenton No worries! I think it's GitHub's fault this time :)

  8. djc commented on Apr 14, 2026

    @djc
    Contributor

    Sorry, that close wasn't intentional. I didn't consider that the auto-close behaviour would trigger across repos

    Wow, that's very surprising!

  9. added this to the 1.29.1 milestone on May 19, 2026
  10. rami3l commented on Jun 29, 2026

    @rami3l
    MemberAuthor

    @djc It seems that there hasn't been an update to https://github.com/console-rs/indicatif/releases since @ChrisDenton's patch, so this fix hasn't reached rustup yet?

    If that is the case, would you mind cutting a new indicatif release first so we can move on with this issue (and thus rustup 1.29.1 beta), or there are some more blockers preventing it from happening?

    Many thanks in advance 🙏

  11. djc commented on Jun 29, 2026

    @djc
    Contributor
  12. linked a pull request that will close this issuechore(deps): lock file maintenance #4926on Jun 29, 2026
  13. rami3l commented on Jul 1, 2026

    @rami3l
    MemberAuthor

    Fix confirmed! Many thanks again to both of you @ChrisDenton @djc :))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugforwardedThis issue as been forwarded "upstream"

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions