Private/SetEditorLocation.ps1

1
2
3
4
5
6
7
8
9
10
11
function SetEditorLocation {
    [CmdletBinding()]
    param([string]$Path)
    end {
        $resolved = ResolveRelativePath $Path
        $psEditor.Workspace.OpenFile($resolved)

        WaitUntil { $psEditor.GetEditorContext().CurrentFile.Path -eq $resolved.Path }
    }
}