-
Notifications
You must be signed in to change notification settings - Fork 18
Description
If the terminal window size changes the app does not redraw until the next input event. This works but is a bit clunky. On *nix there is SIGWINCH which gets sent, but Windows doesn't have a nice equivalent here. There is ReadConsoleInput which will receive a WINDOW_BUFFER_SIZE_RECORD on changes to the screen buffer (which generally maps to window size changes). Unfortunately, using ReadConsoleInput means all stdin usage needs to go through this and can't be mixed with Console.ReadKey(). Example usage on ReadConsoleInput.
Consider adding a console service abstraction and provide platform specific implementations to both allow Windows specific events to be used, and a natural place to put platform specific initialization like Win32Console. Would likely require custom VT parsing.
More info from the Windows Terminal in microsoft/terminal#281 microsoft/terminal#305 microsoft/terminal#14958