Make sure markdown.showSource correctly awaits opening the document (#19289)

Fixes #132914

Co-authored-by: Matt Bierner <matb@microsoft.com>
This commit is contained in:
Barbara Valdez
2022-05-04 14:57:48 -07:00
committed by GitHub
parent 13b722eaf8
commit ae8d3ab1bf

View File

@@ -18,7 +18,7 @@ export class ShowSourceCommand implements Command {
const { activePreviewResource, activePreviewResourceColumn } = this.previewManager;
if (activePreviewResource && activePreviewResourceColumn) {
return vscode.workspace.openTextDocument(activePreviewResource).then(document => {
vscode.window.showTextDocument(document, activePreviewResourceColumn);
return vscode.window.showTextDocument(document, activePreviewResourceColumn);
});
}
return undefined;