Skip to content

Fix editor commands to interrupt current prompt #1725

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

Merged
merged 1 commit into from
Feb 24, 2022

Conversation

andyleejordan
Copy link
Member

Also refactored it slightly to accept the existing cancellationToken send to the handler, and removed an unused logger service. This fixes PowerShell/vscode-powershell#3691.

Also refactored it slightly to accept the existing `cancellationToken`
send to the handler, and removed an unused logger service.
request.Name,
editorContext).ConfigureAwait(false);

return await Unit.Task.ConfigureAwait(false);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No idea why this was the old return type. Almost everything else using the same API returns Unit.Value (which seems the right thing to return).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, clarification on that "almost" it's that async Task<Unit> with an await needs to return Unit.Value, and if it's not async then it's a Unit.Task that needs to be returned.

Copy link
Collaborator

@SeeminglyScience SeeminglyScience left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@andyleejordan andyleejordan merged commit 192f41e into master Feb 24, 2022
@andyleejordan andyleejordan deleted the andschwa/editor-command branch February 24, 2022 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Engine Issue-Bug A bug to squash.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Register-EditorCommand appears broken in preview release
2 participants