Fix #115041: Path to untitled file from search editor is wrong

This commit is contained in:
Jackson Kearl 2021-02-22 19:01:26 -08:00
parent d54923b7f8
commit 6312db1e01

View file

@ -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);
}