aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/commands.ts
diff options
context:
space:
mode:
authorZac Pullar-Strecker <[email protected]>2020-09-01 09:26:10 +0100
committerZac Pullar-Strecker <[email protected]>2020-10-08 03:04:20 +0100
commit974518fde7975b839ed4ccd4c5ce1d48cd6db3c7 (patch)
treecf25ef47c5531ca9934842a963afaabe78fc525f /editors/code/src/commands.ts
parenta14194b428efdb09cc45f9862ec34bef0038cd35 (diff)
Code reorganisation and field support
Diffstat (limited to 'editors/code/src/commands.ts')
-rw-r--r--editors/code/src/commands.ts6
1 files changed, 3 insertions, 3 deletions
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 {
421 421
422export function openDocs(ctx: Ctx): Cmd { 422export function openDocs(ctx: Ctx): Cmd {
423 return async () => { 423 return async () => {
424 console.log("running openDocs");
425 424
426 const client = ctx.client; 425 const client = ctx.client;
427 const editor = vscode.window.activeTextEditor; 426 const editor = vscode.window.activeTextEditor;
428 if (!editor || !client) { 427 if (!editor || !client) {
429 console.log("not yet ready");
430 return 428 return
431 }; 429 };
432 430
@@ -435,7 +433,9 @@ export function openDocs(ctx: Ctx): Cmd {
435 433
436 const doclink = await client.sendRequest(ra.openDocs, { position, textDocument }); 434 const doclink = await client.sendRequest(ra.openDocs, { position, textDocument });
437 435
438 vscode.commands.executeCommand("vscode.open", vscode.Uri.parse(doclink.remote)); 436 if (doclink != null) {
437 vscode.commands.executeCommand("vscode.open", vscode.Uri.parse(doclink));
438 }
439 }; 439 };
440 440
441} 441}