mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-19 16:18:58 +01:00
Fix refs to own file being included in md ref results from other file
For #146277
This commit is contained in:
@@ -135,7 +135,11 @@ export class MdReferencesProvider extends Disposable implements vscode.Reference
|
||||
references.push(new vscode.Location(link.target.fromResource, link.sourceRange));
|
||||
}
|
||||
} else { // Triggered on a link without a fragment so we only require matching the file and ignore fragments
|
||||
references.push(new vscode.Location(link.target.fromResource, link.sourceRange));
|
||||
|
||||
// But exclude cases where the file is referencing itself
|
||||
if (link.target.fromResource.fsPath !== targetDoc.uri.fsPath) {
|
||||
references.push(new vscode.Location(link.target.fromResource, link.sourceRange));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user