-
Notifications
You must be signed in to change notification settings - Fork 503
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
PowerShell Preview: issue with host implementation dropping the first letter #1753
PowerShell Preview: issue with host implementation dropping the first letter #1753
Comments
@sk82jack thanks for reporting this, it looks like this is a buffer issue likely caused by the PSReadLine implementation. |
Yeah I believe this is due to an incorrect assumption on my part. I had thought that if two threads were invoking A possible fix would be to use the same ReadKey override field we use for non-Windows to inject our |
I can confirm that it is still a problem in preview 2. |
I confirm this issue; if I run the following script
and enter |
I've got a PR out to fix this. |
@ili101 looks like that's dropping a few characters on paste. A different issue than this one. Can you open a new issue so we can track this separately? |
System Details
VSCode version: 1.31.0 7c66f58312b48ed8ca4e387ebd9ffe9605332caa x64
VSCode extensions:
CoenraadS.bracket-pair-colorizer-2@0.0.26
eamodio.gitlens@9.5.0
ms-azure-devops.azure-pipelines@1.147.1
ms-mssql.mssql@1.4.0
ms-python.python@2019.1.0
ms-vscode.csharp@1.17.1
ms-vscode.PowerShell-Preview@2.0.0
ms-vsliveshare.vsliveshare@0.3.1151
PSES version: 2.0.0.0
PowerShell version:
Name Value
PSVersion 5.1.17763.134
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17763.134
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
System Details Output
Issue Description
When prompting for input from the host (i.e.
Read-Host
orGet-Credential
) the first letter that you type gets ignored resulting in the intended value of the command to be incorrect. It then writes the initial letter that got committed onto the next line in the console. Please see the gif below:Expected Behaviour
From the example in the gif I would expect the output of the command to be
test
and then have an empty line to continue typing commands.Actual Behaviour
The example in the gif shows that the initial
t
typed is not registered as part of the input and so the command outputsest
and then you can see the intialt
is the written in the console on the next line.Attached Logs
Haven't attached logs as it's not crashing but let me know if you need me to.
The text was updated successfully, but these errors were encountered: