From 4fff264d870fbe27107a0498e32f6dd8d968db49 Mon Sep 17 00:00:00 2001 From: Tyler Leonhardt Date: Fri, 17 Apr 2020 18:38:25 -0700 Subject: [PATCH] Leverage internal HostUI for VT check --- .../Session/Host/EditorServicesPSHostUserInterface.cs | 4 +--- .../Session/Host/TerminalPSHostUserInterface.cs | 5 +++++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/PowerShellEditorServices/Services/PowerShellContext/Session/Host/EditorServicesPSHostUserInterface.cs b/src/PowerShellEditorServices/Services/PowerShellContext/Session/Host/EditorServicesPSHostUserInterface.cs index 0d7812b1e..74938dda6 100644 --- a/src/PowerShellEditorServices/Services/PowerShellContext/Session/Host/EditorServicesPSHostUserInterface.cs +++ b/src/PowerShellEditorServices/Services/PowerShellContext/Session/Host/EditorServicesPSHostUserInterface.cs @@ -67,12 +67,10 @@ internal abstract class EditorServicesPSHostUserInterface : #region Properties -#if !PowerShellv3 && !PowerShellv4 && !PowerShellv5r1 // Only available in Windows 10 Update 1 or higher /// /// Returns true if the host supports VT100 output codes. /// - public override bool SupportsVirtualTerminal => true; -#endif + public override bool SupportsVirtualTerminal => false; /// /// Returns true if a native application is currently running. diff --git a/src/PowerShellEditorServices/Services/PowerShellContext/Session/Host/TerminalPSHostUserInterface.cs b/src/PowerShellEditorServices/Services/PowerShellContext/Session/Host/TerminalPSHostUserInterface.cs index 65043e38f..4776a9b71 100644 --- a/src/PowerShellEditorServices/Services/PowerShellContext/Session/Host/TerminalPSHostUserInterface.cs +++ b/src/PowerShellEditorServices/Services/PowerShellContext/Session/Host/TerminalPSHostUserInterface.cs @@ -65,6 +65,11 @@ public TerminalPSHostUserInterface( #endregion + /// + /// Returns true if the host supports VT100 output codes. + /// + public override bool SupportsVirtualTerminal => internalHostUI.SupportsVirtualTerminal; + /// /// Gets a value indicating whether writing progress is supported. ///