Change:
import { Schemas } from 'vs/base/common/network'; import { Disposable } from 'vs/base/common/lifecycle'; import { URI, UriComponents } from 'vs/base/common/uri'; <del> import { IEditorSerializer } from 'vs/workbench/common/editor'; </del> <ins> import { IEditorSerializer, isUntitledWithAssociatedResource } from 'vs/workbench/common/editor'; </ins> import { EditorInput } from 'vs/workbench/common/editor/editorInput'; import { ITextEditorService } from 'vs/workbench/services/textfile/common/textEditorService'; import { isEqual, toLocalResource } from 'vs/base/common/resources';

Discussion:
<!-- Do Not Delete This! bugreporttemplate --<!-- Please read our Rules of Conduct: --<!-- Read our guide about submitting issues: --<!-- Search existing issues to avoid creating duplicates. --<!-- Test using the latest Insiders build to see if your issue has already been fixed: --<!-- Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. --<!-- Launch with to check. --Does this issue occur when all extensions are disabled?: Yes <!-- If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. --<!-- Issues caused by an extension need to be reported directly to the extension publisher. The 'Help Report Issue' dialog can assist with this. --- VS Code Versions: (@ ), (@ ), (@ ) OS: Win11 x64 (Windows_NT x64 10.0.) <br/Description: "Find all References" shows found results in the "References" side bar. Clicking on a result opens corresponding location. But if result is inside an untitled file, it doesn't go to the location inside that untitled doc, but instead opens a new (empty) untitled doc. Steps to Reproduce: new untitled file () typescript as language ( -) some code to find references: -Click on and select Side Bar should pop up and show one result ( in untitled file) on found result Expected: should show existing untitled file and move cursor to Actual: opens new (empty) untitled file ! Note: Issue isn't just with but with all results that are shown inside References Side Bar. For example same behaviour occurs for too Note: does work and moves cursor to the correct location Note: This isn't a TypeScript issue, but happens for all References results in untitled files, independent of References source. For example same issue with References in Markdown: ! Or with Powershell Extension: ! Note: Issue doesn't exist on web version. In Web version it moves the cursor to the correct location in the correct untitled document and doesn't create a new one. <br/Additional strange behaviour with opened untitled doc from result: If you use in the newly opened untitled file (from previous result), cursor moves to the correct location.

And in old untitled doc now opens in new (but now existing) untitled doc ! To reproduce: open new untitled doc () Set language to Typescript and write: Right Click & on value -References Side Bar opens with one result Click on result -new untitled doc opens Set language to markdown and write: on title and click on result -cursor should move to heading (-correct) Switch to prev untitled doc (with Typescript code) on value and click on result -goes to other existing untitled doc (with markdown)
This seems to be a problem with the command. There is some for untitled-uris which forces a new untitled file
<!-- AUTHORVERIFICATIONREQUEST --This bug has been fixed in the latest release of ! you can help us out by commenting if things are now working as expected. If things still don't seem right, please ensure you're on version of Insiders (today's or later - you can use in the command palette to check), and leave a comment letting us know what isn't working as expected. Happy Coding!
/verified