-
Notifications
You must be signed in to change notification settings - Fork 236
RequestRefactor hotkey throws an InternalError
when calling $CommandSuite.RequestRefactor($PSCmdlet)
#1959
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
Closed
3 tasks done
Comments
Thanks Jake! Lookin' into it |
Non-ESCS repro: $eoeType = [Microsoft.PowerShell.EditorServices.Extensions.EditorObjectExtensions, Microsoft.PowerShell.EditorServices]
$pcdType = [Microsoft.PowerShell.EditorServices.Extensions.Services.PromptChoiceDetails, Microsoft.PowerShell.EditorServices]
$task = $eoeType::GetExtensionServiceProvider($psEditor).EditorUI.PromptSelectionAsync(
'Example message',
@(
$pcdType::new('Label 1', 'Greyed out bit I think'),
$pcdType::new('Label 2', 'woooot')
) -as $pcdType.MakeArrayType())
while (-not $task.AsyncWaitHandle.WaitOne(200)) { }
$result = $task.GetAwaiter().GetResult()
$result |
Nah nothing like that, it's just the |
SeeminglyScience
added a commit
to SeeminglyScience/PowerShellEditorServices
that referenced
this issue
Dec 28, 2022
Fixes PowerShell#1959 The code on the client expects DefaultChoices to never be `null`. If you send `null`, it tries to access the property `length` on what would be an array.
andyleejordan
pushed a commit
that referenced
this issue
Jan 3, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Theorized Causes?
It seems to always be about a cancellation, and the UI was flickering back and forth.
Could the new quick fix feature be fighting for control with the PSES?
Prerequisites
Steps to reproduce
Refactor is crashing.
As far as I can tell I can't get more exception information (using powershell)
Location of the exception:
Documents\PowerShell\Modules\EditorServicesCommandSuite\1.0.0\EditorServicesCommandSuite.psm1
single exception
using a key with nothing bound to it other than this
to reproduce
ctrl+shift+s
to splat something ... it worksctrl+k
to refactor something ... exceptionExpected behavior
Show the refactor menu
Actual behavior
Error details
Environment data
Version
[email protected]
Visuals
The text was updated successfully, but these errors were encountered: