提交 74103c4c 编写于 作者: M Matt Bierner

Don't change preview when click fails but do show an alert

上级 3b58a011
......@@ -463,9 +463,11 @@ export class MarkdownPreview extends Disposable {
}
}
vscode.workspace.openTextDocument(this._resource).then(
vscode.window.showTextDocument,
() => this.showFileNotFoundError());
vscode.workspace.openTextDocument(this._resource)
.then(vscode.window.showTextDocument)
.then(undefined, () => {
vscode.window.showErrorMessage(localize('preview.clickOpenFailed', 'Could not open {0}', this._resource.toString()));
});
}
private async showFileNotFoundError() {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册