diff options
| -rw-r--r-- | win32/winansi.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/win32/winansi.c b/win32/winansi.c index 757a3509d..aafd866a1 100644 --- a/win32/winansi.c +++ b/win32/winansi.c | |||
| @@ -605,6 +605,12 @@ int winansi_set_terminal_width_height(struct winsize *win) | |||
| 605 | 605 | ||
| 606 | sbi.cbSize = sizeof(sbi); | 606 | sbi.cbSize = sizeof(sbi); |
| 607 | if ((ret=GetConsoleScreenBufferInfoEx(console, &sbi)) != 0) { | 607 | if ((ret=GetConsoleScreenBufferInfoEx(console, &sbi)) != 0) { |
| 608 | if (sbi.dwSize.X != win->ws_col) { | ||
| 609 | sbi.dwSize.X = win->ws_col; | ||
| 610 | } | ||
| 611 | if (sbi.dwSize.Y < win->ws_row) { | ||
| 612 | sbi.dwSize.Y = win->ws_row; | ||
| 613 | } | ||
| 608 | sbi.srWindow.Bottom = sbi.srWindow.Top + win->ws_row; | 614 | sbi.srWindow.Bottom = sbi.srWindow.Top + win->ws_row; |
| 609 | sbi.srWindow.Right = sbi.srWindow.Left + win->ws_col; | 615 | sbi.srWindow.Right = sbi.srWindow.Left + win->ws_col; |
| 610 | ret = SetConsoleScreenBufferInfoEx(console, &sbi); | 616 | ret = SetConsoleScreenBufferInfoEx(console, &sbi); |
