File tree 2 files changed +3
-3
lines changed
module/PowerShellEditorServices/Commands/Public
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -155,7 +155,7 @@ function New-EditorFile {
155
155
}
156
156
157
157
$psEditor.Workspace.OpenFile ($fileName , $preview )
158
- $editorContext .CurrentFile.InsertText (($valueList | Out-String ))
158
+ $psEditor .GetEditorContext () .CurrentFile.InsertText(($valueList | Out-String ))
159
159
} else {
160
160
$PSCmdlet.WriteError ( (
161
161
New-Object - TypeName System.Management.Automation.ErrorRecord - ArgumentList @ (
@@ -167,7 +167,7 @@ function New-EditorFile {
167
167
}
168
168
} else {
169
169
$psEditor.Workspace.NewFile ()
170
- $editorContext .CurrentFile.InsertText (($valueList | Out-String ))
170
+ $psEditor .GetEditorContext () .CurrentFile.InsertText(($valueList | Out-String ))
171
171
}
172
172
}
173
173
}
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ function Out-CurrentFile {
26
26
27
27
try {
28
28
# If there is no file open
29
- $psEditor.GetEditorContext ()
29
+ $null = $ psEditor.GetEditorContext ()
30
30
}
31
31
catch {
32
32
# create a new one
You can’t perform that action at this time.
0 commit comments