mirror of
https://github.com/microsoft/vscode.git
synced 2026-07-10 16:58:55 -05:00
When clicking on a link to a folder in markdown, reveal the folder
Fixes #91336
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user