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

GIT Bash has bad flicker #7200

Closed
GordonSmith opened this issue Aug 6, 2020 · 18 comments
Closed

GIT Bash has bad flicker #7200

GordonSmith opened this issue Aug 6, 2020 · 18 comments
Labels
Needs-Attention The core contributors need to come back around and look at this ASAP. Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting

Comments

@GordonSmith
Copy link

Environment

Windows build number: Microsoft Windows [Version 10.0.19042.423]
Windows Terminal version (if applicable):  1.1.2021.0  

Any other software?
Git for windows:  v2.28.0

Steps to reproduce

  1. Open a "GIT Bash" terminal session
  2. Press backspace key
  3. BashFlicker

Expected behavior

No nasty flicker

Actual behavior

Nasty flicker

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Aug 6, 2020
@zadjii-msft
Copy link
Member

That looks to me like they're using the "visual bell". Is there anything about bell-style in your ~/.inputrc or /etc/inputrc?

@zadjii-msft zadjii-msft added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Aug 6, 2020
@GordonSmith
Copy link
Author

GordonSmith commented Aug 6, 2020

I don't have a ~/.inputrc file and this is GIT Bash on windows so no /etc folder either - but I suspect you are correct as it does correlate with when I might normally hear a "bing".

@ghost ghost added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Aug 6, 2020
@KalleOlaviNiemitalo
Copy link

Git for Windows does install an /etc directory (perhaps mapped to C:\Program Files\Git\etc) and an /etc/inputrc file that includes set bell-style visible.

https://github.com/git-for-windows/build-extra/blob/1227299bc78df003c3b246edbd04a583ac162dc7/git-extra/inputrc#L1-L2

@GordonSmith
Copy link
Author

Ok - I will close invalid - can it be disabled in Terminal settings, or do I need to do the local /etc/inputrc?

@GordonSmith
Copy link
Author

Closing invalid - Terminal is honouring inputrc settings...

@KalleOlaviNiemitalo
Copy link

I believe the visual bell uses the flash capability from terminfo. For xterm-256color, the value is \E[?5h$<100/>\E[?5l. AFAIK, Windows Terminal does not provide a way to disable the \E[?5h and \E[?5l control sequences. It might be best to set bell-style audible or set bell-style none in ~/.inputrc so that the setting will survive Git for Windows upgrades.

@KalleOlaviNiemitalo
Copy link

On the other hand, if DECSCNM is primarily used for visual bell, then it might make sense for Windows Terminal to disable it when animations are disabled according to SystemParametersInfo SPI_GETCLIENTAREAANIMATION.

@thomasaarholt
Copy link

To fix: nano ~/.inputrc and add the text set bell-style none or set bell-style audible. Press Ctrl + O and Ctrl + X to Save and Exit.

I found this behaviour to be really distracting/disurbing.
The regular Git Bash terminal does exhibit this behaviour, though I can confirm that /c/Program Files/Git/etc/.inputrc does contain set bell-style visible (and that command is not overwritten by anything in .inputrc.

Note that set bell-style audible does not give a ping sound in Git Bash in Windows Terminal, but it does do so in regular Git Bash.

@DHowett
Copy link
Member

DHowett commented Aug 12, 2020

So, that’s because we only recently got support for visual bells at all. There’s an escape sequence that inverts the entire screen, and a visual bell is typically implemented by sending it, waiting a bit, and then sending it again.

Git Bash will start doing this inbox in Windows at some point with the next Desktop release, as it is required by standard for us to support it.

@KalleOlaviNiemitalo
Copy link

set bell-style audible does not give a ping sound in Git Bash in Windows Terminal

Seemingly covered by #1608 and #4046.

@fzzio
Copy link

fzzio commented May 11, 2021

Thank you!

@rluvaton
Copy link

rluvaton commented Sep 11, 2021

I keep coming back here way too many times 🤣

@lingyanmeng
Copy link

Although the backspace is fixed, I still met the same issue during vi editing in git bash, and the workaround mentioned above is not working

@brighamandersen
Copy link

brighamandersen commented Dec 22, 2021

If anyone has issues saying 'Permission Denied' when you try to save your changes, make sure that when you open your terminal to open inputrc in nano (Git Bash for me), you run your terminal as administrator.

@MachineLearning-Nerd
Copy link

Although the backspace is fixed, I still met the same issue during vi editing in git bash, and the workaround mentioned above is not working

set t_vb=

in .vimrc

@danfly09
Copy link

I just made a copy to my local folder and commented that bell style line as follows

cd go to your home directory
cat /etc/inputrc > .inputrc print inputrc content to .inputrc file in your home directory... don't forget the DOT

Now edit your local file
set bell-style visible before
# set bell-style visible after

Restart your shell.

@ToxicSmurf
Copy link

ToxicSmurf commented Jun 4, 2022

This little quirk was the main reason I wasn't using Git bash on Windows Terminal as my default shell, now I have no reason…

Thank you!!

@xudyang1
Copy link

For those who don't want a .inputrc polluting your home directory, add the following to your .bashrc file:

bind 'set bell-style none'
# or bind 'set bell-style audible'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs-Attention The core contributors need to come back around and look at this ASAP. Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting
Projects
None yet
Development

No branches or pull requests