Skip to content

Commit 25e2240

Browse files
JustinGroteCopilot
andauthored
Simplify IsUntitled getter (even tho I'm pretty sure this will break it again)
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 9bba5bf commit 25e2240

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/PowerShellEditorServices/Services/TextDocument/ScriptFile.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,10 @@ internal sealed class ScriptFile
5656
public bool IsInMemory { get; internal set; }
5757

5858
/// <summary>
59-
/// Getter that returns if the document is not backed by a saved file path (not in-memory).
59+
/// Gets a value indicating whether the document URI is not a <c>file://</c> URI
60+
/// (for example, an <c>untitled:</c> URI).
6061
/// </summary>
61-
public bool IsUntitled => !DocumentUri?.ToUri().IsFile ?? false;
62+
public bool IsUntitled => !DocumentUri.ToUri().IsFile;
6263

6364
/// <summary>
6465
/// Gets a string containing the full contents of the file.

0 commit comments

Comments
 (0)