diff --git a/extensions/search-result/src/extension.ts b/extensions/search-result/src/extension.ts index 0f0528af877..67fb86553a9 100644 --- a/extensions/search-result/src/extension.ts +++ b/extensions/search-result/src/extension.ts @@ -135,6 +135,9 @@ function relativePathToUri(path: string, resultsUri: vscode.Uri): vscode.Uri | u } if (pathUtils.isAbsolute(path)) { + if (/^[\\\/]Untitled-\d*$/.test(path)) { + return vscode.Uri.file(path.slice(1)).with({ scheme: 'untitled', path: path.slice(1) }); + } return vscode.Uri.file(path); }