From ae8d3ab1bf1969c9d96d3691650c65fb8436166c Mon Sep 17 00:00:00 2001 From: Barbara Valdez <34872381+barbaravaldez@users.noreply.github.com> Date: Wed, 4 May 2022 14:57:48 -0700 Subject: [PATCH] Make sure markdown.showSource correctly awaits opening the document (#19289) Fixes #132914 Co-authored-by: Matt Bierner --- .../markdown-language-features/src/commands/showSource.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/markdown-language-features/src/commands/showSource.ts b/extensions/markdown-language-features/src/commands/showSource.ts index 6e4beb43fa..9322b294de 100644 --- a/extensions/markdown-language-features/src/commands/showSource.ts +++ b/extensions/markdown-language-features/src/commands/showSource.ts @@ -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;