Skip to content

Backspace, left and right in Windows integrated terminal cause prompt to go out of sync in Git bash #7345

Closed

Description

@JasonKleban
  • VSCode Version: 1.2.0-insider
  • OS Version: Windows 10
  • Terminal: Git bash

Steps to Reproduce:

  1. Invoke the new integrated terminal
  2. type command
  3. backspace to delete some characters
  4. 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.

Activity

  1. Tyriar commented on Jun 7, 2016

    @Tyriar
    Contributor

    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?

  2. added
    bug
    terminal
    windows
    on Jun 7, 2016
  3. JasonKleban commented on Jun 7, 2016

    @JasonKleban
    Author

    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.

    echo

  4. moshahmed commented on Jun 17, 2016

    @moshahmed

    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

  5. gerane commented on Jun 22, 2016

    @gerane

    I get this in powershell too. I don't use cygwin so it is not caused by that when I am in PowerShell.

  6. gerane commented on Jun 22, 2016

    @gerane

    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.

  7. 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
  8. added
    upstream
    on Jul 29, 2016
  9. Tyriar commented on Aug 1, 2016

    @Tyriar
    Contributor

    Brandon Padgett (@gerane) I feel like this is fixed in Insiders now, I can't reproduce anymore. Have you seen it recently?

  10. gerane commented on Aug 2, 2016

    @gerane

    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.

  11. 8 remaining items

  12. JamesEarle commented on Oct 13, 2016

    @JamesEarle

    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.

    vscode_bug

  13. added
    help wanted
    on Oct 13, 2016
  14. PontusRenmarker commented on Nov 2, 2016

    @PontusRenmarker

    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.

  15. ffes commented on Nov 4, 2016

    @ffes

    With the Cygwin bash this problem occurs this well.

  16. plhosk commented on Nov 17, 2016

    @plhosk

    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.

  17. Tyriar commented on Nov 18, 2016

    @Tyriar
    Contributor

    I've started tracking all issues like this in #14613 as I believe they're all related.

  18. added
    *duplicate
    and removed
    bug
    on Dec 8, 2016
  19. Tyriar commented on Jan 16, 2017

    @Tyriar
    Contributor

    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.

  20. tqwewe commented on Jan 20, 2017

    @tqwewe

    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.

  21. Tyriar commented on Jan 20, 2017

    @Tyriar
    Contributor

    acidic9 great to hear! It's likely around 2 weeks off.

  22. Kenya-West commented on May 15, 2017

    @Kenya-West

    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
    terminal-is-out-of-sync

  23. Tyriar commented on May 15, 2017

    @Tyriar
    Contributor
  24. locked and limited conversation to collaborators on May 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

*duplicatehelp wantedterminalupstreamwindows

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions