This ensures that outer console window is correctly resized.
The issue is shown below and described below the picture.
If you have a console window (on windows 10) with vertical scroll bar (Picture#1 from left), then first calling SetConsoleWindowInfo and then calling SetConsoleScreenBufferSize results in empty space (shown in picture #2 with red rectangle).
The correct way is to reverse these i.e. first change ScreenBufferSize and then the window size. The update_size_maybe() function had the right change, but I missed this in Init() in my previous commit. The picture #3 shows that with this PR, we get the console window size change correctly.
This ensures that outer console window is correctly resized.
The issue is shown below and described below the picture.
If you have a console window (on windows 10) with vertical scroll bar (Picture#1 from left), then first calling SetConsoleWindowInfo and then calling SetConsoleScreenBufferSize results in empty space (shown in picture #2 with red rectangle).
The correct way is to reverse these i.e. first change ScreenBufferSize and then the window size. The update_size_maybe() function had the right change, but I missed this in Init() in my previous commit. The picture #3 shows that with this PR, we get the console window size change correctly.