-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Flickering when typing in Windows Terminal #6214
Comments
I've tracked it down to this nushell/crates/nu-cli/src/prompt_update.rs Lines 97 to 117 in 233afeb
left_prompt_string causes flickering. The only other idea I have is exposing the string from reedline for manipulation but I'm open to ideas.
|
I give up on this. 😭 I've tried 5 or so ways to try and prevent this flickering by moving this shell integration settings around but every time the prompt is updated flicker occurs. I've even tried augmenting the reedline trait so that in the repl.rs i can update the left prompt string, after the prompt is initially set but it resulted in the same flickering. The flicker is super aggravating but apparently no one else on windows uses a heavily customized prompt. So, i'll have to wait until someone care enough and is smart enough to fix it. :) |
Update: This is reproduceable with the prompt in our default_env.nu (below) so it's not related to my prompt script. It's related to every custom prompt.
|
I'm noticing flicker when typing too (mostly default config, Windows Terminal, Nu running on both Windows+WSL). I did a edit: I need to read before investigating things, I noticed that you also pinpointed the exact PR. My bad 😅 |
LOL. Yes, flickering on Windows is horrible. I can't figure it out. My guess is that it's not this PR directly because it's silly that this code change would cause a flicker for each character you type. I think this PR is a symptom, not the problem. |
@fdncred figured out that this is only happening in Windows Terminal Preview v1.15 (thanks!). In Preview v1.15 they added experimental scroll mark support, which is also the subject of #6087 so... there must be some bad interaction between our scroll mark output and WT. Disabling scroll mark support in WT doesn't fix the issue, unfortunately. |
@rgwood Do you think we should add an issue on the WT repo? |
Yes I think that would be a good idea. If you have time now, great; if not I can file an issue tonight or tomorrow. |
@rgwood Would you mind doing it please, whenever you can get to it? Just ping me here with the issue number so i can subscribe to it. |
@fdncred Filed: microsoft/terminal#13710 |
Setting "shell_integration: false" in config.nu fixes the problem |
@micgao correct. that's why I listed the commit that added that feature when I created this issue. disabling that feature is not a "fix". |
commenting just to say that this also happens on WT Preview 1.16.2641.0, with nushell downloaded as-is from winget and the default config file. For any other beginners that (like me) stumble upon this issue as soon as they install nu: it's sufficient to comment the first section, up until |
I still get flicker in wt and wtp, even if the right prompt is removed. |
Nu users: if this bothers you please upvote the Windows Terminal issue |
Thanks, that's worked for me 🙇♂️ |
This problem is still there as of today. |
@g-berthiaume The issue is gone in the latest |
Ok thanks for the update. |
So BTW, whatever causes this in Windows terminal also makes WezTerm do something weird, whenever I type a key it's adding a newline to my terminal output, thus pushing any content above the prompt upwards. |
Setting shell_integration false fixes WezTerm as well. |
@bartdorsey Yup, Wez was working on that last I checked. Trying to use the conpty that WT uses or something like that. #5585 |
I get this in ConEmu despite |
I think the root of this problem is that nushell/reedline redraws the prompt with every character typed. If you have a fast system and a fast terminal, it's not very noticeable. We'd love for someone to dig in and fix it in reedline. However, this issue should be closed because it was specifically about Windows Terminal and that is fixed. |
If this is an example of a broader issue, then please redirect it to that GitHub issue. |
FYI for users of recent versions of nushell: |
Describe the bug
with every character typed the screen flickers see gifs below. it works fine in 0.65.0.
git bisect says
98126e2 is the first bad commit
I don't really understand what is going on and why this PR is causing issues.
How to reproduce
run nushell on windows terminal with oh-my.nu custom prompt. it may happen with other prompts too, i'm not sure. i'm also not sure if it happens on other operating systems. i haven't noticed it on my mac but maybe redraw/flicker is so fast i don't see it.
Expected behavior
no flickering
Screenshots
both these gifs demonstrate the flicker/redraw/blink but they don't capture it perfectly. it flickers on every keystroke. the gifs miss some flickers.
In WezTerm it's horrendous and redraws the prompt on every single character
Configuration
Additional context
No response
The text was updated successfully, but these errors were encountered: