-
Notifications
You must be signed in to change notification settings - Fork 510
Ctrl-space results in writing a character #4939
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
Comments
Hi, can you please file a bug upstream with VS Code? The value of your |
This issue has been labeled as resolved, please verify the provided fix (or other reason). |
@andyleejordan But I think I read your comment wrong. The issue does not happen with the regular PowerShell terminal. Only with the extension integrated terminal. |
This issue has been labeled as resolved, please verify the provided fix (or other reason). |
Thanks for confirming the terminal. In that case we'll get this triaged. |
@andyleejordan any update? the issue is still present. |
I found this line in Microsoft.PowerShell_profile.ps1; which I assume is not directly related to the integrated shell but with the regular shell which does not have the issue:
Path: It contains this exciting piece of code: function Send-Completions {
$commandLine = ""
$cursorIndex = 0
# TODO: Since fuzzy matching exists, should completions be provided only for character after the
# last space and then filter on the client side? That would let you trigger ctrl+space
# anywhere on a word and have full completions available
[Microsoft.PowerShell.PSConsoleReadLine]::GetBufferState([ref]$commandLine, [ref]$cursorIndex)
$completionPrefix = $commandLine
# Get completions
$result = "`e]633;Completions"
if ($completionPrefix.Length -gt 0) {
# Get and send completions
$completions = TabExpansion2 -inputScript $completionPrefix -cursorColumn $cursorIndex
if ($null -ne $completions.CompletionMatches) {
$result += ";$($completions.ReplacementIndex);$($completions.ReplacementLength);$($cursorIndex);"
$result += $completions.CompletionMatches | ConvertTo-Json -Compress
}
}
$result += "`a"
Write-Host -NoNewLine $result
} Do you see the I am on to something......... |
So...we don't add anything to |
I ran vscode / PowerShell extension with a clean |
@andyleejordan ctrl+space matches with
Based on this log record from the shortcut key diagnostics:
and this yields the On Discord (PowerShell/#vscode) there is this helpful user |
Did you try disabling |
I added
But it sounds illogical that shell integration should be disabled? |
It sounds like there's a mismatch between Code's keybinding and the extension terminal's shell integration logic which is supposed to interpret it into something other than writing a character. I'm updating the extension terminal to use VS Code's shell integration script directly: PowerShell/PowerShellEditorServices#2156 |
@cveld can you test the latest pre-release, v2024.3.2-preview and let me know if it still happens? |
I believe the issue went away with vscode 1.88.1 and PowerShell extension 2024.2 🥳 |
This issue has been labeled as resolved, please verify the provided fix (or other reason). |
This issue has been labeled as needing fix verification and has not had any activity a week. It has been closed for housekeeping purposes. |
Prerequisites
Summary
After having run at least one command, ctrl-space starts resulting in writing the
a
character.PowerShell Version
Visual Studio Code Version
Extension Version
Steps to Reproduce
dir
a
Visuals
Logs
No response
The text was updated successfully, but these errors were encountered: