Cursor navigation gets dirty symbols in the terminal #16078

Closed
opened 2026-01-31 04:56:55 +00:00 by claunia · 10 comments
Owner

Originally created by @karpulix on GitHub (Dec 9, 2021).

Windows Terminal version

1.12.2931.0

Windows build number

10.0.19043.0

Other Software

GNU Midnight Commander 4.8.7
Built with GLib 2.42.2

mintty 3.5.1 (Git Bash)

Steps to reproduce

  1. Use Git Bash
            {
                "acrylicOpacity": 1.0,
                "backgroundImageStretchMode": "uniformToFill",
                "bellStyle": "none",
                "colorScheme": "Vintage",
                "commandline": "C:\\Program Files\\Git\\bin\\bash.exe -i -l",
                "experimental.retroTerminalEffect": false,
                "font": 
                {
                    "face": "JetBrains Mono",
                    "weight": "light"
                },
                "guid": "{22a05ebd-bd8c-4882-a99d-53f9a993c069}",
                "icon": "\ud83d\ude80",
                "name": "git bash",
                "padding": "10",
                "startingDirectory": "%USERPROFILE%",
                "tabTitle": "git bash",
                "useAcrylic": false
            }
  1. Use a slower connection then usually
  2. Connect to a remote host
  3. Create a file check.txt with 50-100 empty lines
  4. Open the file in mcedit
  5. Сlick and hold the cursor (right or down)
  6. You will see that symbols will appear in the file

This problem doesn't reproduce in Git Bash without WT

Expected Behavior

image

Actual Behavior

Screenshot

Originally created by @karpulix on GitHub (Dec 9, 2021). ### Windows Terminal version 1.12.2931.0 ### Windows build number 10.0.19043.0 ### Other Software GNU Midnight Commander 4.8.7 Built with GLib 2.42.2 mintty 3.5.1 (Git Bash) ### Steps to reproduce 1. Use Git Bash ``` { "acrylicOpacity": 1.0, "backgroundImageStretchMode": "uniformToFill", "bellStyle": "none", "colorScheme": "Vintage", "commandline": "C:\\Program Files\\Git\\bin\\bash.exe -i -l", "experimental.retroTerminalEffect": false, "font": { "face": "JetBrains Mono", "weight": "light" }, "guid": "{22a05ebd-bd8c-4882-a99d-53f9a993c069}", "icon": "\ud83d\ude80", "name": "git bash", "padding": "10", "startingDirectory": "%USERPROFILE%", "tabTitle": "git bash", "useAcrylic": false } ``` 2. Use a slower connection then usually 2. Connect to a remote host 3. Create a file check.txt with 50-100 empty lines 4. Open the file in mcedit 5. Сlick and hold the cursor (right or down) 6. You will see that symbols will appear in the file This problem doesn't reproduce in Git Bash without WT ### Expected Behavior ![image](https://user-images.githubusercontent.com/16068884/145339659-66a080c0-4e89-40fe-b018-2b39c59a3bbc.png) ### Actual Behavior ![Screenshot](https://user-images.githubusercontent.com/16068884/145339575-830d7407-81ed-4915-9569-5ce586700311.png)
Author
Owner

@zadjii-msft commented on GitHub (Dec 9, 2021):

This is kinda like #4037, but that's mostly for the terminal<->conpty connection. This is more at the conpty<->API layer presumably, or the API<->client layer. The bit about

Use a slower connection then usual

is going to make this a little tricky to debug.

Does this repro if you run C:\Program Files\Git\bin\bash.exe -i -l in the vintage console (conhost.exe), and then try reproing the scenario? That might help narrow the issue down.

@zadjii-msft commented on GitHub (Dec 9, 2021): This is kinda like #4037, but that's mostly for the terminal\<-\>conpty connection. This is more at the conpty\<-\>API layer presumably, or the API\<-\>client layer. The bit about >Use a slower connection then usual is going to make this a little tricky to debug. Does this repro if you run `C:\Program Files\Git\bin\bash.exe -i -l` in the vintage console (`conhost.exe`), and then try reproing the scenario? That might help narrow the issue down.
Author
Owner

@DanPinGF commented on GitHub (Dec 11, 2021):

Does the problem get worse, possibly with Mojibake garbage (e.g., ∟►ÿá∟;►@ñ►@ [...])?

@DanPinGF commented on GitHub (Dec 11, 2021): Does the problem get worse, possibly with Mojibake garbage (e.g., `∟►ÿá∟;►@ñ►@ [...]`)?
Author
Owner

@carenas commented on GitHub (Dec 12, 2021):

incomplete escape codes that were then "ghost typed" was tracked down recently as a bug in msys2-runtime (which git bash links with) as shown in git-for-windows/git#3579.

if the problem has the same root cause (it was also sensitive to connection responsiveness) could explain this and therefore should be fixed in the next snapshot/release of git for windows (as well as the current latest msys2, if you can reproduce/test it there).

note that the cygwin developer that produced the fix doesn't expect[1] it will affect ConPTY (which is what Windows Terminal uses), but you are still using msys2 pty with bash and probably also mcedit (unless it is not an MSYS2 package)

[1] https://cygwin.com/pipermail/cygwin-patches/2021q4/011593.html

@carenas commented on GitHub (Dec 12, 2021): incomplete escape codes that were then "ghost typed" was tracked down recently as a bug in msys2-runtime (which git bash links with) as shown in git-for-windows/git#3579. if the problem has the same root cause (it was also sensitive to connection responsiveness) could explain this and therefore should be fixed in the next snapshot/release of git for windows (as well as the current latest msys2, if you can reproduce/test it there). note that the cygwin developer that produced the fix doesn't expect[1] it will affect ConPTY (which is what Windows Terminal uses), but you are still using msys2 pty with bash and probably also mcedit (unless it is not an MSYS2 package) [1] https://cygwin.com/pipermail/cygwin-patches/2021q4/011593.html
Author
Owner

@zadjii-msft commented on GitHub (Dec 15, 2021):

Thanks for the context @carenas! I don't think I ever would have been able to track that down. I'm gonna leave this one open till there's a fresh msys2-runtime to download and try out with the fix. Hopefully the issue will just go away - if it doesn't, we'll take another look.

@zadjii-msft commented on GitHub (Dec 15, 2021): Thanks for the context @carenas! I don't think I ever would have been able to track that down. I'm gonna leave this one open till there's a fresh msys2-runtime to download and try out with the fix. Hopefully the issue will just go away - if it doesn't, we'll take another look.
Author
Owner

@zadjii-msft commented on GitHub (Jan 4, 2022):

@carenas My apologies for being a bit dense, but do you know if there's a new release of the msys2 runtime with that fix that @karpulix could try our to see if this was in fact the root cause? I'm not really sure myself how things are ingested across the various different git repos 😅

@zadjii-msft commented on GitHub (Jan 4, 2022): @carenas My apologies for being a bit dense, but do you know if there's a new release of the msys2 runtime with that fix that @karpulix could try our to see if this was in fact the root cause? I'm not really sure myself how things are ingested across the various different git repos 😅
Author
Owner

@carenas commented on GitHub (Jan 4, 2022):

do you know if there's a new release of the msys2 runtime with that fix

the current version (as of the time of the original post) of msys2 included it, so the issue (and fix) should be reproducible (if fixed) by :

@carenas commented on GitHub (Jan 4, 2022): > do you know if there's a new release of the msys2 runtime with that fix the current version (as of the time of the original post) of msys2 included it, so the issue (and fix) should be reproducible (if fixed) by : - install latest msys2 (https://github.com/msys2/msys2-installer/releases/download/2021-11-30/msys2-x86_64-20211130.exe) - update to latest (```pacman -Syuuu```)
Author
Owner

@zadjii-msft commented on GitHub (Jan 4, 2022):

Thanks! @karpulix can you see if that fixes this?

@zadjii-msft commented on GitHub (Jan 4, 2022): Thanks! @karpulix can you see if that fixes this?
Author
Owner

@ghost commented on GitHub (Jan 9, 2022):

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@ghost commented on GitHub (Jan 9, 2022): This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
Author
Owner

@carenas commented on GitHub (Jan 11, 2022):

I'm not really sure myself how things are ingested across the various different git repos 😅

@karpulix: latest git RC[1] also includes the msys/cygwin fix, if testing with git is easier

[1] https://github.com/git-for-windows/git/releases/tag/v2.35.0-rc0.windows.1

@carenas commented on GitHub (Jan 11, 2022): > I'm not really sure myself how things are ingested across the various different git repos 😅 @karpulix: latest git RC[1] also includes the msys/cygwin fix, if testing with git is easier [1] https://github.com/git-for-windows/git/releases/tag/v2.35.0-rc0.windows.1
Author
Owner

@ghost commented on GitHub (Jan 16, 2022):

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@ghost commented on GitHub (Jan 16, 2022): This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#16078