-
Notifications
You must be signed in to change notification settings - Fork 298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ArgumentOutOfRangeException when snapping Windows Terminal from one screen to another screen's edge. #1155
Comments
Do you happen to have a command entered on the command line at the time this occurs? Did the window size change in the process? What was BufferWidth and BufferHeight before vs after? Have you tried PSReadLine beta 5? |
@msftrncs
|
@carlossanlop, you are using PSReadLine 2.0.0-beta4, beta5 is out, beta6 is coming soon. However, looking at everything again (sorry, I must have been distracted), this looks like something I just posted a PR for, #1182, though its different that you ran in to it. Did you press ENTER after the screen snap event? Was the cursor on the screen at that time? Was there a different in DPI's between the two screens? I'm trying to come up with the scenario to reproduce the issue. WindowsTerminal does seem to do some weird things when moving from a larger window to a smaller one ... |
Okay, think I found it.
It seems to help that the cursor is further down the buffer while the window is larger, than there is lines in the buffer when the window is smaller, with the command already typed out before the window is moved. There is another issue, if you undock back to the smaller window, then dock again to a bigger window, the text will be scrolled up but the cursor will move back to the bottom on the next keypress. I think PR #1182 takes care of this exception issue, from what I can test. |
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:
Exception
I ran the script you suggest in the issue description template. Here is the output:
The text was updated successfully, but these errors were encountered: