Skip to content

Commit 93e5a94

Browse files
committed
support goto def on /// references with absolute path
1 parent 0434635 commit 93e5a94

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/services/services.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2573,7 +2573,8 @@ module ts {
25732573
/// Triple slash reference comments
25742574
var comment = forEach(sourceFile.referencedFiles, r => (r.pos <= position && position < r.end) ? r : undefined);
25752575
if (comment) {
2576-
var targetFilename = normalizePath(combinePaths(getDirectoryPath(filename), comment.filename));
2576+
var targetFilename = isRootedDiskPath(comment.filename) ? comment.filename : combinePaths(getDirectoryPath(filename), comment.filename);
2577+
targetFilename = normalizePath(targetFilename);
25772578
if (program.getSourceFile(targetFilename)) {
25782579
return [{
25792580
fileName: targetFilename,

0 commit comments

Comments
 (0)