-
-
Notifications
You must be signed in to change notification settings - Fork 808
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
Prompt is auto-backspacing after typing two chars #704
Comments
Does it still do it if you remove this from your profile?
Technically, you don't need the above unless you are actually adding script other than the |
Yes, it still does. Thanks for letting me know it's not needed. Windows Terminal: 0.5.2681.0 (same as on other machine that is not showing this). |
OK, I'm updating to 6.2.3 and I'm running the same version of WindowsTerminal. I suspect I won't be able to repro it but I'll try. Does this repro for you in the PowerShell Core console (not WindowsTerminal)? Also can you dump the output of |
Also, what version of PSReadLine do you have? |
"beta3" |
If I run pwsh.exe directly, i can't repro (I assume that's what you mean by Powershell Core console). |
When I ran that command on the machine that's working fine, it didn't return anything. So I just did On good machine I got a version of 1.2. On bad machine it says 2.0.0. ??? |
Hmm, OK that points to something different about running inside WindowsTerminal. When you run pwsh.exe directly - so that it appears in a normal conhost window (not the WindowsTerminal) - what version of PSReadLine does it report - |
Just noted good machine is running Powershell 6.0.3, not 6.2.3 (that bad machine has). |
Windows Terminal profiles.json:
|
Interesting. In this case, WindowsTerminal is providing the configuration for PowerShell Core. What happens if you change its
This will be missing an icon but I just want to see if this is related to WT's embedded PSCore configuration. |
I didn't mean to close this issue btw. |
Yeah, no problem. I've hit the wrong button at the bottom of these editors from time to time myself. :-) |
Not clear to me what setting you want me to replace with the above. Can you clarify? |
Change this section of the profile:
to
|
When I open PowerShell Core 6 in WT after these changes, I the issue is still NOT fixed. |
OK, eliminated one issue. Can you update the setting above to:
This should start PS Core without PSReadLine loaded. You will need to manually import posh-git |
After doing this I do NOT see the issue. |
OK, so it's running PSReadLine 2.0.0-beta3 inside WindowsTerminal. Let's see if an update to the latest PSReadLine fixes this:
You will need to remove the |
After
But can still repro. |
OK, I think we can point the finger here at |
For giggles, on the other machine that was working, I created a WT profile for PS Core 7 preview (which I had installed for some reason). I can repro the problem there. So the issue was introduced between 6.0.3 and 6.2.3, and also exists in 7.0.0-preview.4". |
It is possible that 6.0 shipped with PSReadLine 1.2. Don't remember for sure. |
I also noticed this, and posted about it in the Windows Terminal repository. Someone suggested it was caused by the I have no idea whether this is the "real" cause, or if it's PSReadLine, or some combination; just thought I would share. |
I can repro, and i can confirm that changing the font face from "cascadia code" to (for example) "consolas", the issue disappear. |
You work-around this problem by going to a two-line prompt like so:
That will give you a prompt like this:
Or, if you'd prefer a single line prompt, then change the branch identical symbol:
which yields:
I've also verified that this issue has been fixed in Windows Terminal by testing this in a local, dev build. The fix will be available in the next drop of Windows Terminal. |
Since the issue is external to this project, I'm going to close this. |
System Details
Issue Description
See above. Each screen shot was taken after I typed a character. I typed "cod" (as in code).
Note how after I typed the "d" the "co" jumped back one space?
This only happens on this machine (I have another, identically configured). This happens only w/in a git directory (e.g. when the posh-git prompt is displayed).
I have not customized the $prompt at all.
My profile:
What could be causing this?
EDIT: This does NOT happen in Hosts other than Windows Terminal. E.g. in the VSCode terminal, cmd.exe, and ConEmu it works fine.
The text was updated successfully, but these errors were encountered: