You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Backspace, left and right in Windows integrated terminal cause prompt to go out of sync in Git bash #7345
*duplicateIssue identified as a duplicate of another issue(s)help wantedIssues identified as good community contribution opportunitiesterminalGeneral terminal issues that don't fall under another labelupstreamIssue identified as 'upstream' component related (exists outside of VS Code)windowsVS Code on Windows issues
Notice that while the command executed will be accurate to what was typed, the display of the line will be out of sync with the internal state of the terminal.
Reacted by Andrii Dieiev, Jakub Řičař, Paul Hoskinson, Daniel Cornelison and Sergey Zolotarev
OK, this is happening very easily to me. Unfortunately I couldn't figure out any modern programs that show the actual keystrokes in an overlay for Windows (anybody know??) and this isn't a great capture, but it does show it happening a few times, should be obvious without the keystrokes showing. On the first line when I try to delete all the text including "echo", I can't backspace any more but the echo still shows. executing what looks like echo whatever is really just whatever in the buffer.
Then the next line I just show that echo whatever without any backspaces normally works fine and got a surprise that the newline wasn't printed!
Then I tried a third example and that one exhibited no glitches finally.
This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version. The most recent version should
reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution. Rebooting is also suggested if you
are unable to find another cygwin DLL.
Segmentation fault
I also see issues when moving left and right. The visual cursor can get slightly out of sync with where it really is. Usually it is a space or 2 when it happens.
changed the title [-]Backspace in terminal not working (in git bash within Windows 10?)[/-][+]Backspace, left and right in Windows integrated terminal cause prompt to go out of sync[/+]on Jul 29, 2016
Daniel Imms (@Tyriar) I still see the visual cursor in the wrong place occasionally. Almost always by a single space.
It might show in one spot but is really 1 to the left or right. If I move the cursor, the visual cursor might lag behind or skip ahead by 1 space of where the actual cursor is located. Then if I enter input it isn't input where the visual cursor shows it should be.
Related to this (shown below), when you type any command that has parameters in quotation marks, typing somecommand "" and then using left arrow to move the cursor back between the quotation marks will throw it out of sync. Specifically, it will insert additional quotation marks while you're typing.
Hi!
Backspace works as a space button for me. I am unable to reproduce what JasonKleban displayed.
But I can reproduce the problem with quotations and left arrow in git bash but not in either powershell or cmd. Running windows 10 pro N.
Have you found any working solution?
EDIT:
Re-installed git bash and it is now working. Cannot reproduce the problem I had before.
I have had this out of sync issue in the Visual Code terminal with git bash since I downloaded Visual Code (a few months ago) and it has never been solved. I just downloaded the Visual Code Insiders Build and I can confirm it is now working correctly.
Looking forward to when this terminal fix will be updated to the regular Visual Code.
*duplicateIssue identified as a duplicate of another issue(s)help wantedIssues identified as good community contribution opportunitiesterminalGeneral terminal issues that don't fall under another labelupstreamIssue identified as 'upstream' component related (exists outside of VS Code)windowsVS Code on Windows issues
Activity
Tyriar commentedon Jun 7, 2016
I haven't actually seen this, could you include a screenshot or a gif? I'm assuming you set it to the bash.exe not the git bash executable also?
JasonKleban commentedon Jun 7, 2016
OK, this is happening very easily to me. Unfortunately I couldn't figure out any modern programs that show the actual keystrokes in an overlay for Windows (anybody know??) and this isn't a great capture, but it does show it happening a few times, should be obvious without the keystrokes showing. On the first line when I try to delete all the text including "echo", I can't backspace any more but the echo still shows. executing what looks like
echo whateveris really justwhateverin the buffer.Then the next line I just show that
echo whateverwithout any backspaces normally works fine and got a surprise that the newline wasn't printed!Then I tried a third example and that one exhibited no glitches finally.
moshahmed commentedon Jun 17, 2016
Windows7 Start > cmd > cd c:\gitportable-209-x64\bin > bash.exe
user@host MING64 /bin
$ ast (backspace becomes space)
This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version. The most recent version should
reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution. Rebooting is also suggested if you
are unable to find another cygwin DLL.
Segmentation fault
gerane commentedon Jun 22, 2016
I get this in powershell too. I don't use cygwin so it is not caused by that when I am in PowerShell.
gerane commentedon Jun 22, 2016
I also see issues when moving left and right. The visual cursor can get slightly out of sync with where it really is. Usually it is a space or 2 when it happens.
[-]Backspace in terminal not working (in git bash within Windows 10?)[/-][+]Backspace, left and right in Windows integrated terminal cause prompt to go out of sync[/+]Tyriar commentedon Aug 1, 2016
Brandon Padgett (@gerane) I feel like this is fixed in Insiders now, I can't reproduce anymore. Have you seen it recently?
gerane commentedon Aug 2, 2016
Daniel Imms (@Tyriar) I still see the visual cursor in the wrong place occasionally. Almost always by a single space.
It might show in one spot but is really 1 to the left or right. If I move the cursor, the visual cursor might lag behind or skip ahead by 1 space of where the actual cursor is located. Then if I enter input it isn't input where the visual cursor shows it should be.
8 remaining items
JamesEarle commentedon Oct 13, 2016
Related to this (shown below), when you type any command that has parameters in quotation marks, typing
somecommand ""and then using left arrow to move the cursor back between the quotation marks will throw it out of sync. Specifically, it will insert additional quotation marks while you're typing.PontusRenmarker commentedon Nov 2, 2016
Hi!
Backspace works as a space button for me. I am unable to reproduce what JasonKleban displayed.
But I can reproduce the problem with quotations and left arrow in git bash but not in either powershell or cmd. Running windows 10 pro N.
Have you found any working solution?
EDIT:
Re-installed git bash and it is now working. Cannot reproduce the problem I had before.
ffes commentedon Nov 4, 2016
With the Cygwin bash this problem occurs this well.
plhosk commentedon Nov 17, 2016
This problem is happening for me on Windows 10 (version 1607 build 14393.447) with VSCode 1.7.1 and Git for Windows 2.10.2.
When I use bash.exe as the integrated terminal, the backspace or arrow keys cause the cursor to become out of sync with what's printed on the screen.
Tyriar commentedon Nov 18, 2016
I've started tracking all issues like this in #14613 as I believe they're all related.
Tyriar commentedon Jan 16, 2017
This should hopefully be fixed in tomorrow's Insiders build (via 63f1fa6). Please let me know if it still reproduces.
See #13625 for more information.
tqwewe commentedon Jan 20, 2017
I have had this out of sync issue in the Visual Code terminal with git bash since I downloaded Visual Code (a few months ago) and it has never been solved.
I just downloaded the Visual Code Insiders Build and I can confirm it is now working correctly.
Looking forward to when this terminal fix will be updated to the regular Visual Code.
Tyriar commentedon Jan 20, 2017
acidic9 great to hear! It's likely around 2 weeks off.
Kenya-West commentedon May 15, 2017
Same here, man. It happens on different sizes of window.
Specs:

Windows 10 Creators Update x64
VS Code up-to-date
bash (Ubuntu on Windows)/Powershell/Whatever
Tyriar commentedon May 15, 2017
Innokenty Ivanov (@Kenya-West) that issue is #19665