From 44953b3526a657de0001a51825302c80036a91f4 Mon Sep 17 00:00:00 2001 From: Dongbo Wang Date: Tue, 10 Apr 2018 14:55:03 -0700 Subject: [PATCH] Make the 'PSESRemoteSessionOpenFile' a support event --- src/PowerShellEditorServices/Session/RemoteFileManager.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PowerShellEditorServices/Session/RemoteFileManager.cs b/src/PowerShellEditorServices/Session/RemoteFileManager.cs index bba8e5316..04bee2df7 100644 --- a/src/PowerShellEditorServices/Session/RemoteFileManager.cs +++ b/src/PowerShellEditorServices/Session/RemoteFileManager.cs @@ -199,14 +199,14 @@ function New-EditorFile { [string] $PSEditModule ) - Register-EngineEvent -SourceIdentifier PSESRemoteSessionOpenFile -Forward + Register-EngineEvent -SourceIdentifier PSESRemoteSessionOpenFile -Forward -SupportEvent New-Module -ScriptBlock ([Scriptblock]::Create($PSEditModule)) -Name PSEdit | Import-Module -Global "; private const string RemovePSEditFunctionScript = @" Get-Module PSEdit | Remove-Module - Get-EventSubscriber -SourceIdentifier PSESRemoteSessionOpenFile -EA Ignore | Unregister-Event + Unregister-Event -SourceIdentifier PSESRemoteSessionOpenFile -Force -ErrorAction Ignore "; private const string SetRemoteContentsScript = @"