From c1168e1a24cf00ad777822de2e15582f1dcebed4 Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Fri, 1 Jul 2016 16:14:24 -0700 Subject: [PATCH] Note that CursorSize throws on Windows when output is redirected --- .../host/msh/ConsoleHostRawUserInterface.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostRawUserInterface.cs b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostRawUserInterface.cs index 1cbee3a30..77986f8d8 100644 --- a/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostRawUserInterface.cs +++ b/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHostRawUserInterface.cs @@ -1586,6 +1586,8 @@ namespace Microsoft.PowerShell /// public override int CursorSize { + // Future porting note: this API throws on Windows when output is + // redirected, but never throws on Unix because it's fake. get { return Console.CursorSize; } set { Console.CursorSize = value; } }