Skip to content

bug: prompt flickering on input sync issue #1302

Open

Description

@mkatychev

nushell/nushell@684b4df introduced input flickering in nushell for the platforms/terminals/multiplexers I tested below:

OS Term multiplexer flicker
Windows Windows Terminal n/a no
Windows Windows Terminal zellij yes
Windows Alacritty n/a yes
Windows Noctty n/a no
Windows Noctty zellij yes
Windows Alacritty n/a yes
macOS Alacritty n/a no
macOS Alacritty tmux yes
macOS Ghostty n/a no
macOS Ghostty tmux yes
$ git bisect good
684b4dff76d6eca70e8e3d0de3c1f4bcc219755c is the first bad commit
commit 684b4dff76d6eca70e8e3d0de3c1f4bcc219755c
Author: Martin Kronberger <kronberger@proton.me>
Date:   Sun Oct 18 19:31:23 2026 +0200

    chore: bump reedline to 39db5e3 (#19290)

    ## Description

    Bumps reedline to `39db5e3`, six PRs past `d704744`:

...

Describe the problem you are observing.

Steps to reproduce

nu --no-config-file with the appropriate os/term/mux triple above should produce prompt/input flickering issues when typing rapidly

Screenshots/Screencaptures

Alacritty on macOS:

flicker.mp4

Activity

  1. mkatychev commented on Nov 10, 2026

    @mkatychev
    Author

    My initial suspicion out of the 5 commits in nushell/nushell@684b4df is #1254

    EDIT: reverting 1254 fixes the issue: mkatychev#1

  2. kronberger-droid commented on Nov 10, 2026

    @kronberger-droid
    Collaborator

    Well I will not just revert it. But good that you found the change which introduced it and tested it in different terminals. That's a great help, will look into it soon.

  3. mkatychev commented on Nov 11, 2026

    @mkatychev
    Author

    Well I will not just revert it

    wouldn't dream of it, just wanted to confirm that I could isolate the commit

  4. kronberger-droid commented on Nov 11, 2026

    @kronberger-droid
    Collaborator

    @mkatychev
    Can you check out #1304 and test the baseline plus both commits and report back. I would like to make this fix as minimal as possible and this would help me a lot, since I neither have windows or mac to test this on.

  5. mkatychev commented on Nov 11, 2026

    @mkatychev
    Author

    @kronberger-droid I tested #1304 and unfortunately the issue persists in macOS/(Alacritty|Ghostty)/tmux at the same frequency

  6. kronberger-droid commented on Nov 11, 2026

    @kronberger-droid
    Collaborator

    @mkatychev
    Did you check it on all commits? I also rebased it onto main. So now the last checkout should essentially be your bisection.

    git clone -b fix/1302-sync-flicker https://github.com/kronberger-droid/reedline
    cd reedline
    
    git checkout 14be1e0; cargo run --release --example basic   # main, should flicker
    git checkout 8db160c; cargo run --release --example basic   # hide inside the frame
    git checkout 1fa34e1; cargo run --release --example basic   # no frame around a repaint
  7. mkatychev commented on Nov 11, 2026

    @mkatychev
    Author

    @kronberger-droid I did the testing and can report that 14be1e0 and 8db160c do flicker and 1fa34e1 does not! I suspect moving self.stdout.queue(SetAttribute(Attribute::Reset))?; outside of let painted did the trick!

  8. kronberger-droid commented on Nov 11, 2026

    @kronberger-droid
    Collaborator

    @mkatychev
    Can you check out the latest version of the PR? It should now be the minimal change to fix it.

  9. mkatychev commented on Nov 11, 2026

    @mkatychev
    Author

    1f4c41d has the issue fixed!

  10. kronberger-droid commented on Nov 11, 2026

    @kronberger-droid
    Collaborator

    @mkatychev Thanks for testing!

  11. mkatychev commented on Nov 11, 2026

    @mkatychev
    Author

    @kronberger-droid Actually I was able to produce the flicker effect again but it took quite a bit of effort 😆, I think there's still a desync issue it is just far less pronounced

    flicker_2.mp4
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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions