Skip to content

Fix #222: Prompt functions hang in editor commands #230

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
May 16, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,10 @@ private Task HandleInvokeExtensionCommandRequest(
InvokeExtensionCommandRequest commandDetails,
RequestContext<string> requestContext)
{
// We don't await the result of the execution here because we want
// to be able to receive further messages while the editor command
// is executing. This important in cases where the pipeline thread
// gets blocked by something in the script like a prompt to the user.
EditorContext editorContext =
this.editorOperations.ConvertClientEditorContext(
commandDetails.Context);
Expand All @@ -207,7 +211,7 @@ private Task HandleInvokeExtensionCommandRequest(
return requestContext.SendResult(null);
});

return commandTask;
return Task.FromResult(true);
}

private async Task HandleExpandAliasRequest(
Expand Down