diff --git a/modules.json b/modules.json index 1f17d7faa..a3000fab8 100644 --- a/modules.json +++ b/modules.json @@ -6,6 +6,6 @@ "Version": "1.1.3" }, "PSReadLine": { - "Version": "2.2.2" + "Version": "2.2.3" } } diff --git a/src/PowerShellEditorServices/Services/PowerShell/Host/PsesInternalHost.cs b/src/PowerShellEditorServices/Services/PowerShell/Host/PsesInternalHost.cs index e0d2d15d3..8697f45ab 100644 --- a/src/PowerShellEditorServices/Services/PowerShell/Host/PsesInternalHost.cs +++ b/src/PowerShellEditorServices/Services/PowerShell/Host/PsesInternalHost.cs @@ -1022,13 +1022,6 @@ private void OnCancelKeyPress(object sender, ConsoleCancelEventArgs args) } } - private static readonly ConsoleKeyInfo s_nullKeyInfo = new( - keyChar: ' ', - ConsoleKey.DownArrow, - shift: false, - alt: false, - control: false); - private ConsoleKeyInfo ReadKey(bool intercept) { // PSRL doesn't tell us when CtrlC was sent. @@ -1047,11 +1040,7 @@ private ConsoleKeyInfo ReadKey(bool intercept) // TODO: We may want to allow users of PSES to override this method call. _lastKey = System.Console.ReadKey(intercept); - - // TODO: After fixing PSReadLine so that when canceled it doesn't read a key, we can - // stop using s_nullKeyInfo (which is a down arrow so we don't change the buffer - // content). Without this, the sent key press is translated to an @ symbol. - return _readKeyCancellationToken.IsCancellationRequested ? s_nullKeyInfo : _lastKey.Value; + return _lastKey.Value; } internal ConsoleKeyInfo ReadKey(bool intercept, CancellationToken cancellationToken)