You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
System.ArgumentOutOfRangeException: The value must be greater than or equal to zero and less than the console's buffer size in that dimension. #5099
Search the existing issues, especially the pinned issues.
Exception report
Oops, something went wrong. Please report this bug with the details below.Report on GitHub: https://github.com/lzybkr/PSReadLine/issues/new-----------------------------------------------------------------------Last 200 Keys: n Space " a d d _ l i b r a r y " Space | Space F o r E a c h - O b j e c t Space { Space " $ ( $ _ . L i n e N u m b e r ) : Space $ ( $ _ . L i n e ) " Space } Space } Space f i n a l l y Space { Space i f Space ( $ ? ) Space { Space e c h o Space " 8 0 5 3 5 3 c 5 1 6 c d 4 2 5 3 9 2 d 8 9 b 5 9 c c 0 e 7 7 d 3 = $ ? " Space } Space e l s e Space { Space e c h o Space " 8 0 5 3 5 3 c 5 1 6 c d 4 2 5 3 9 2 d 8 9 b 5 9 c c 0 e 7 7 d 3 = $ ? " Space } Space } Enter Ctrl+Enter Enter Enter Enter Enter Enter Enter Enter Enter Enter EnterException:System.ArgumentOutOfRangeException: The value must be greater than or equal to zero and less than the console's buffer size in that dimension.Parameter name: topActual value was -15. at System.Console.SetCursorPosition(Int32 left, Int32 top) at Microsoft.PowerShell.PSConsoleReadLine.ReallyRender(RenderData renderData, String defaultColor) at Microsoft.PowerShell.PSConsoleReadLine.ForceRender() at Microsoft.PowerShell.PSConsoleReadLine.Insert(Char c) at Microsoft.PowerShell.PSConsoleReadLine.AcceptLineImpl(Boolean validate) at Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(ConsoleKeyInfo key, Dictionary`2 dispatchTable, Boolean ignoreIfNoAction, Object arg) at Microsoft.PowerShell.PSConsoleReadLine.InputLoop() at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics)-----------------------------------------------------------------------
Screenshot
I understand that similar bugs are supposed to have been fixed but I installed Visual Studio Community just yesterday, and I get the issue in the Github Copilot Terminal. The Terminal window crashed, so the environment data is from a Developer PowerShell window.
Github Copilot would hang, apparently waiting for keyboard input, so I would press Enter, in order to actually execute the command that Copilot was trying to execute.
Expected behavior
I would expect Copilot to be able to execute whatever it needs to execute in a Github Copilot Terminal.
Actual behavior
Github Copilot Terminal hangs, expecting keyboard input in many situations.
This issue was already fixed (see #1306). Please upgrade to the 2.3.5 version of PSReadLine from PowerShell Gallery.
See the upgrading section for instructions. Please let us know if you run into the same issue with the latest version.
Activity
github-actions commentedon Feb 24, 2026
This issue was already fixed (see #1306). Please upgrade to the 2.3.5 version of PSReadLine from PowerShell Gallery.
See the upgrading section for instructions. Please let us know if you run into the same issue with the latest version.