From 974518fde7975b839ed4ccd4c5ce1d48cd6db3c7 Mon Sep 17 00:00:00 2001 From: Zac Pullar-Strecker Date: Tue, 1 Sep 2020 20:26:10 +1200 Subject: Code reorganisation and field support --- editors/code/src/commands.ts | 6 +++--- editors/code/src/lsp_ext.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'editors/code') diff --git a/editors/code/src/commands.ts b/editors/code/src/commands.ts index b22cd450b..24c2e196d 100644 --- a/editors/code/src/commands.ts +++ b/editors/code/src/commands.ts @@ -421,12 +421,10 @@ export function gotoLocation(ctx: Ctx): Cmd { export function openDocs(ctx: Ctx): Cmd { return async () => { - console.log("running openDocs"); const client = ctx.client; const editor = vscode.window.activeTextEditor; if (!editor || !client) { - console.log("not yet ready"); return }; @@ -435,7 +433,9 @@ export function openDocs(ctx: Ctx): Cmd { const doclink = await client.sendRequest(ra.openDocs, { position, textDocument }); - vscode.commands.executeCommand("vscode.open", vscode.Uri.parse(doclink.remote)); + if (doclink != null) { + vscode.commands.executeCommand("vscode.open", vscode.Uri.parse(doclink)); + } }; } diff --git a/editors/code/src/lsp_ext.ts b/editors/code/src/lsp_ext.ts index 562804715..fc8e120b3 100644 --- a/editors/code/src/lsp_ext.ts +++ b/editors/code/src/lsp_ext.ts @@ -119,4 +119,4 @@ export interface CommandLinkGroup { commands: CommandLink[]; } -export const openDocs = new lc.RequestType('experimental/externalDocs'); +export const openDocs = new lc.RequestType('experimental/externalDocs'); -- cgit v1.2.3