Remove onCommand from markdown preview

This commit is contained in:
Matt Bierner
2018-09-21 13:36:37 -07:00
parent 388a62fe12
commit a101ececf4
7 changed files with 11 additions and 22 deletions

View File

@@ -20,7 +20,7 @@ function normalizeLink(
// Assume it must be an relative or absolute file path
// Use a fake scheme to avoid parse warnings
const tempUri = vscode.Uri.parse(`fake-scheme:${link}`);
const tempUri = vscode.Uri.parse(`vscode-resource:${link}`);
let resourcePath = tempUri.path;
if (!tempUri.path) {

View File

@@ -128,10 +128,6 @@ export class MarkdownPreview {
this.onCacheImageSizes(e.body);
break;
case 'command':
vscode.commands.executeCommand(e.body.command, ...e.body.args);
break;
case 'revealLine':
this.onDidScrollPreview(e.body.line);
break;
@@ -140,6 +136,10 @@ export class MarkdownPreview {
this.onDidClickPreview(e.body.line);
break;
case 'clickLink':
vscode.commands.executeCommand('_markdown.openDocumentLink', e.body);
break;
case 'showPreviewSecuritySelector':
vscode.commands.executeCommand('markdown.showPreviewSecuritySelector', e.body.source);
break;