Skip to content

Commit e7bc301

Browse files
committed
When clicking on a link to a folder in markdown, reveal the folder
Fixes microsoft#91336
1 parent b4b5b62 commit e7bc301

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

extensions/markdown-language-features/src/commands/openDocumentLink.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ export class OpenDocumentLinkCommand implements Command {
6666
}
6767
}
6868

69+
const stat = await vscode.workspace.fs.stat(resource);
70+
if (stat.type === vscode.FileType.Directory) {
71+
return vscode.commands.executeCommand('revealInExplorer', resource);
72+
}
73+
6974
return vscode.workspace.openTextDocument(resource)
7075
.then(document => vscode.window.showTextDocument(document, column))
7176
.then(editor => this.tryRevealLine(editor, args.fragment));

0 commit comments

Comments
 (0)