mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 21:55:38 +00:00
Make sure we use normalized path for compare
Fixes #50760 (the path should already have been normalized at this point so I don't think there is any user impact)
This commit is contained in:
parent
a7a4c6cb6a
commit
2319e47db1
|
@ -46,10 +46,10 @@ export class OpenDocumentLinkCommand implements Command {
|
|||
}
|
||||
|
||||
private async tryOpen(path: string, args: OpenDocumentLinkArgs) {
|
||||
if (vscode.window.activeTextEditor && isMarkdownFile(vscode.window.activeTextEditor.document) && vscode.window.activeTextEditor.document.uri.fsPath === path) {
|
||||
const resource = vscode.Uri.file(path);
|
||||
if (vscode.window.activeTextEditor && isMarkdownFile(vscode.window.activeTextEditor.document) && vscode.window.activeTextEditor.document.uri.fsPath === resource.fsPath) {
|
||||
return this.tryRevealLine(vscode.window.activeTextEditor, args.fragment);
|
||||
} else {
|
||||
const resource = vscode.Uri.file(path);
|
||||
return vscode.workspace.openTextDocument(resource)
|
||||
.then(vscode.window.showTextDocument)
|
||||
.then(editor => this.tryRevealLine(editor, args.fragment));
|
||||
|
|
Loading…
Reference in a new issue