Skip to content

Conversation

fflaten
Copy link
Contributor

@fflaten fflaten commented Feb 20, 2023

PR Summary

Updates New-EditorFile to insert text in the newly created editor as intended.

Also took the liberty to drop the EditorContext-object currently being returned from Out-CurrentFile after #869. I'm 99% sure that's unintended 🙂 /cc @dfinke

PR Context

Fix PowerShell/vscode-powershell#3192

The object returned from GetEditorContext() always points
to the original file in CurrentFile. We need to get an updated object
after opening or creating a file to insert text in the right editor.

Fix PowerShell/vscode-powershell#3192
PowerShell#869 forgot to assign a returned editorcontext,
causing new output from the command. Assigning to null.
@fflaten fflaten requested a review from a team as a code owner February 20, 2023 18:51
Copy link
Member

@andyleejordan andyleejordan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, great fix, thanks @fflaten! (Also I spy yet another file I didn't even know existed 🤫)

@andyleejordan andyleejordan merged commit 7d6b961 into PowerShell:main Feb 21, 2023
@fflaten fflaten deleted the module-patch1 branch February 21, 2023 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New-EditorFile posts input to currently open editor
2 participants