-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
GetLargestConsoleWindowSize returns incorrect size in Terminal #10337
Comments
If you're familiar with the console API, it's a bit disappointing, but many things don't work when a console app runs in Windows Terminal. For one thing, there is no console window; i.e., no CONSOLE_WINDOW_CLASS window. This will shed some light: https://docs.microsoft.com/en-us/windows/console/getlargestconsolewindowsize A year or more ago @DHowett gave me a fairly detailed account of what you can/cannot expect to work. I can't find the issue. If @DHowett chimes in here, perhaps he can dredge it up. |
(This is an ongoing discussion, but I need to get my notes in order in order to reply ;P) |
I just ranted about that fact elsewhere, but anyways - it's okay if something doesn't work, especially when there are technical limitations. But please, please, make it obvious that it doesn't work by returning FALSE, or, in this particular case, returning {0, 0} and setting the last error to something sensible to give an app a chance to recover. |
You know, we've had this discussion before as it turns out! /dup #2712 |
Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report! |
Windows Terminal version (or Windows build number)
1.9.1445.0
Other Software
No response
Steps to reproduce
Compile and run the following code:
Expected Behavior
Some sane output, e.g.
Actual Behavior
Reported width is insanely large:
Actual maximum size (maximize the window and type
mode con
):The text was updated successfully, but these errors were encountered: