When clicking on a link to a folder in markdown, reveal the folder

Fixes #91336
This commit is contained in:
Matt Bierner
2020-04-13 13:02:14 -07:00
parent b4b5b6251e
commit e7bc301be6

View File

@@ -66,6 +66,11 @@ export class OpenDocumentLinkCommand implements Command {
}
}
const stat = await vscode.workspace.fs.stat(resource);
if (stat.type === vscode.FileType.Directory) {
return vscode.commands.executeCommand('revealInExplorer', resource);
}
return vscode.workspace.openTextDocument(resource)
.then(document => vscode.window.showTextDocument(document, column))
.then(editor => this.tryRevealLine(editor, args.fragment));