-
Notifications
You must be signed in to change notification settings - Fork 498
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
New-EditorFile works on non-powershell untitled files #1580
Conversation
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.
LGTM
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.
LGTM
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.
LGTM
…1555) * Log when languageClient not loaded. Copy the pattern from ExtensionsCommandsFeature to the other instances of the check without a log of the error.
Make the PSScriptAnalyzer issue redirect template more explicit about what PSScriptAnalyzer handles in the PowerShell extension.
I'm assuming the branch is ok here? Seems to have incorporated commits from other PRs somehow... |
Yeah that was from a rebase I think |
@tylerl0706 my understanding is that if you rebase a branch that is already published you need to force push for it to be clean. That does rewrite history, but it's probably fine for a fork. You can also do a merge instead which will group it probably. That said I'm not a git ninja so ymmv 😉 |
Yeah looking at the history (because I forgot lol), that's what I did (a rebase) which is what I wanted. Had to force push to rewrite history but I wanted that because I wanted my commits in this PR to be after what's in master. I think it's typically a good idea to rebase before merging - especially when the target branch had a lot of action - just to make sure your stuff works with what's currently in the target. A merge from target to incoming works fine too... But I like the idea of my PR commits being after what's in the target |
@tylerl0706 are you sure you force pushed though? That looks like a normal push after rebase (the button in VSCode is a normal push) |
Yeah I'm pretty sure I did. I typically use the git CLI. I'll double check though |
Yep the log looks good and I even did a force push again and that said everything is up to date.
|
Partnered with: PowerShell/PowerShellEditorServices#774
This fixes the problem where
$psEditor.GetEditorContext()
assumed that the file open was a real file on the file system OR a powershell untitled file. Since that isn't always the case, It would throw an exception:This also means that
New-EditorFile -Value 'asdf'
actually works when you don't have your default language mode set to PowerShell.This PR was needed to give GetEditorContext the content of the untitled file.
fixes #810