Closed
Description
Environment data
Windows 10
Using Windows Terminal (Preview) version 0.6.2951.0
Steps to reproduce or exception report
All the other similar issues have already been closed, which is why I'm opening a new one.
I have two screens, one in portrait mode, another one in landscape mode. I had the Windows Terminal window on the landscape mode, and I moved it to the portrait mode. I waited for Windows to snap the window automatically to the edges, and that's when the crash message showed up:
PS D:\corefx>
Oops, something went wrong. Please report this bug with the details below.
Report on GitHub: https://github.com/PowerShell/PSReadLine/issues/new
### Environment
PSReadLine: 2.0.0-beta4
PowerShell: 7.0.0-preview.2
OS: Microsoft Windows 10.0.18363
Last 200 Keys
Enter
Enter
Enter
l s Enter
g i t k Enter
g i t Spacebar r e b a s e Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace Backspace g i t Spacebar r e b a s e Spacebar d o t n e t / m a s t e r Enter
g i t k Enter
c d Spacebar . . Enter
c d Spacebar d o t n e t - a p i - d o c s Enter
g i t Spacebar f e t c h Spacebar d o t n e t Enter
c d Spacebar . . Enter
c d Spacebar c o r e f x Enter
g i t Spacebar s t a t u s Enter
Enter
Exception
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: top
Actual value was 61.
at System.ConsolePal.SetCursorPosition(Int32 left, Int32 top)
at Microsoft.PowerShell.PSConsoleReadLine.AcceptLineImpl(Boolean validate)
at Microsoft.PowerShell.PSConsoleReadLine.AcceptLine(Nullable`1 key, Object arg)
at Microsoft.PowerShell.PSConsoleReadLine.ProcessOneKey(PSKeyInfo key, Dictionary`2 dispatchTable, Boolean ignoreIfNoAction, Object arg)
at Microsoft.PowerShell.PSConsoleReadLine.InputLoop()
at Microsoft.PowerShell.PSConsoleReadLine.ReadLine(Runspace runspace, EngineIntrinsics engineIntrinsics, CancellationToken cancellationToken)
I ran the script you suggest in the issue description template. Here is the output:
PS version: 7.0.0-preview.2
PSReadline version: 2.0.0-beta4
os: 10.0.18362.1 (WinBuild.160101.0800)
PS file version: 7.0.0.0
HostName: ConsoleHost (Windows Terminal)
BufferWidth: 151
BufferHeight: 56
Metadata
Metadata
Assignees
Labels
No labels