We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bfb4e8e commit ffd0ef7Copy full SHA for ffd0ef7
module/PowerShellEditorServices/Commands/Public/CmdletInterface.ps1
@@ -136,6 +136,11 @@ function New-EditorFile {
136
$preview = $true
137
}
138
139
+ # Resolve full path before passing to editor
140
+ if (!([System.IO.Path]::IsPathRooted($fileName))) {
141
+ $fileName = $ExecutionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($fileName)
142
+ }
143
+
144
$psEditor.Workspace.OpenFile($fileName, $preview)
145
$psEditor.GetEditorContext().CurrentFile.InsertText(($valueList | Out-String))
146
} else {
0 commit comments