From 6d9155a9dc87324c294a9a06efebeddcd18743e9 Mon Sep 17 00:00:00 2001 From: Rob Holt Date: Mon, 4 Nov 2019 13:04:35 -0800 Subject: [PATCH 1/2] Fix '@' appearing in console --- .../Services/PowerShellContext/Console/ConsoleProxy.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PowerShellEditorServices/Services/PowerShellContext/Console/ConsoleProxy.cs b/src/PowerShellEditorServices/Services/PowerShellContext/Console/ConsoleProxy.cs index 4c2f92015..9a674d0ad 100644 --- a/src/PowerShellEditorServices/Services/PowerShellContext/Console/ConsoleProxy.cs +++ b/src/PowerShellEditorServices/Services/PowerShellContext/Console/ConsoleProxy.cs @@ -188,7 +188,7 @@ internal static ConsoleKeyInfo SafeReadKey(bool intercept, CancellationToken can } catch (OperationCanceledException) { - return default(ConsoleKeyInfo); + return new ConsoleKeyInfo(' ', ConsoleKey.DownArrow, shift: false, alt: false, control: false); } } } From da19d18af41373d0192231d836526cf37ce9b4d1 Mon Sep 17 00:00:00 2001 From: Rob Holt Date: Wed, 6 Nov 2019 10:19:05 -0800 Subject: [PATCH 2/2] Name param --- .../Services/PowerShellContext/Console/ConsoleProxy.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/PowerShellEditorServices/Services/PowerShellContext/Console/ConsoleProxy.cs b/src/PowerShellEditorServices/Services/PowerShellContext/Console/ConsoleProxy.cs index 9a674d0ad..a6e056b82 100644 --- a/src/PowerShellEditorServices/Services/PowerShellContext/Console/ConsoleProxy.cs +++ b/src/PowerShellEditorServices/Services/PowerShellContext/Console/ConsoleProxy.cs @@ -188,7 +188,12 @@ internal static ConsoleKeyInfo SafeReadKey(bool intercept, CancellationToken can } catch (OperationCanceledException) { - return new ConsoleKeyInfo(' ', ConsoleKey.DownArrow, shift: false, alt: false, control: false); + return new ConsoleKeyInfo( + keyChar: ' ', + ConsoleKey.DownArrow, + shift: false, + alt: false, + control: false); } } }