Skip to content

Commit ea55e6b

Browse files
dkattanCopilot
andcommitted
fix: keep untitled buffers discoverable
Allow TryGetFile() to return existing in-memory untitled documents. This preserves the debugger's untitled script workflow while still letting provider-backed paths flow through WorkspaceService. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent c942560 commit ea55e6b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/PowerShellEditorServices/Services/Workspace/WorkspaceService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ public bool TryGetFile(Uri fileUri, out ScriptFile scriptFile) =>
195195
/// <param name="scriptFile">The out parameter that will contain the ScriptFile object.</param>
196196
public bool TryGetFile(DocumentUri documentUri, out ScriptFile scriptFile)
197197
{
198-
if (ScriptFile.IsUntitledPath(documentUri.ToString()) || !ScriptFile.IsSupportedScheme(documentUri.Scheme))
198+
if (!ScriptFile.IsSupportedScheme(documentUri.Scheme))
199199
{
200200
scriptFile = null;
201201
return false;

0 commit comments

Comments
 (0)