Skip to content

Commit

Permalink
Merge branch 'main' into seanmcm/fixAddTrustedCompiler
Browse files Browse the repository at this point in the history
  • Loading branch information
sean-mcmanus authored May 18, 2023
2 parents 782efb8 + 4b20f32 commit 9658cc6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Extension/src/LanguageServer/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,8 @@ export interface CreateDeclarationOrDefinitionParams {

export interface CreateDeclarationOrDefinitionResult {
edit: WorkspaceEdit;
clipboardText: string;
errorText: string;
clipboardText?: string;
errorText?: string;
}

interface ShowMessageWindowParams {
Expand Down Expand Up @@ -3514,7 +3514,9 @@ export class DefaultClient implements Client {
const result: CreateDeclarationOrDefinitionResult = await this.languageClient.sendRequest(CreateDeclarationOrDefinitionRequest, params);
// Create/Copy returned no result.
if (result.edit === undefined) {
vscode.window.showInformationMessage(result.errorText); // Copy/Create Declaration/Definition was completely unsuccessful due to api failure.
// The only condition in which result.edit would be undefined is a
// server-initiated cancellation, in which case the object is actually
// a ResponseError. https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#responseMessage
return;
}

Expand Down

0 comments on commit 9658cc6

Please sign in to comment.