-
Notifications
You must be signed in to change notification settings - Fork 234
Needed changes for Notebook UI Support #1321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Needed changes for Notebook UI Support #1321
Conversation
// For any vscode-notebook-cell, we need to ignore the backing file on disk. | ||
if (scriptFile.DocumentUri.Scheme == "vscode-notebook-cell" && | ||
uri.Path == scriptFile.DocumentUri.Path && | ||
uri.Scheme == "file") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check is probably simpler and should perhaps come second
DocumentUri uri = DocumentUri.From(foundReference.FilePath); | ||
// For any vscode-notebook-cell, we need to ignore the backing file on disk. | ||
if (scriptFile.DocumentUri.Scheme == "vscode-notebook-cell" && | ||
uri.Path == scriptFile.DocumentUri.Path && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need to be case-insensitive?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They should be identical ... because in both cases it's using the actual file path on the file system.
@@ -217,8 +217,7 @@ internal static List<string> GetLinesInternal(string text) | |||
internal static bool IsUntitledPath(string path) | |||
{ | |||
Validate.IsNotNull(nameof(path), path); | |||
|
|||
return path.ToLower().StartsWith("untitled:"); | |||
return DocumentUri.From(path).Scheme.ToLower() != Uri.UriSchemeFile; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return DocumentUri.From(path).Scheme.ToLower() != Uri.UriSchemeFile; | |
return string.Equals(DocumentUri.From(path).Scheme, Uri.UriSchemeFile, StringComparison.OrdinalIgnoreCase); |
There is nothing really stopping this from going in now... but I'll wait until we're a bit further along with PowerShell/vscode-powershell#2789 |
6157315
to
5045b8d
Compare
I wanted to make changes to PSES as small as possible because Notebook UI is a vscode feature, but some things had to be done.