fix(runtime/windows): (WinOS) Fix calculation of console size
Fixes #23872.
I haven't implemented an underflow check for the subtractions, but I can if requested.
I read the docs a bit closer and decided that over/under-flow protection was warranted given the vagueness.
Return will be either correct, or, if bad values are received, { cols: 0, rows: 0 }.
@littledivy can you, please, shepherd this PR to landing?
@rivy can you rebase this PR onto main? Also, please allow maintainers the ability to push to your branches in the future. I went through and fixed this PR myself and then wasn't able to push.
@rivy can you rebase this PR onto main? Also, please allow maintainers the ability to push to your branches in the future. I went through and fixed this PR myself and then wasn't able to push.
Happy to rebase.
I didn't specifically disallow maintainer edits; I just opened a quick PR. But I also don't now see the "Allow edits from maintainers" checkbox to enable access. I'm not sure why it's not there... some permission issue? on my fork? Any idea?
@dsherret
Also, please allow maintainers the ability to push to your branches in the future. I went through and fixed this PR myself and then wasn't able to push.
I did some quick research, and the permission problem might be related to my fork being "organization owned" (I segregate forks which I don't "own" but commit to into a "rivy-fix" organization). It looks like cross-organization edit permission is not enabled. There's some discussion about this as a problem in the community discussions (see https://github.com/orgs/community/discussions/5634).
Ultimately, it looks like the missing permission is at least a documentation problem if not a frankly ignored bug.
ref: https://github.com/orgs/community/discussions/5634 ref: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/about-permissions-and-visibility-of-forks