Open Windows console handle to retrieve dimensions (#396)
If stdout is redirected on Windows, the dimensions of the terminal
won't be correctly retrieved. Open the console instead, using the
special filename CONOUT$, and ask the dimensions of this handle.
Keep a fallback to stdout if the console can't be opened.
https://learn.microsoft.com/en-us/windows/console/console-handles
7cac1a
-
May 29 16:07 +00:00