terminal: Enhance terminal size detection for multiple outputs
No binary (build failed)
—
(log yok)
| @@ -62,6 +62,10 @@ unsigned int get_terminal_columns(void) | |
| struct winsize ts; | |
| if(!ioctl(STDIN_FILENO, TIOCGWINSZ, &ts)) | |
| cols = (int)ts.ws_col; | |
| + | else if(!ioctl(STDOUT_FILENO, TIOCGWINSZ, &ts)) |
| + | cols = (int)ts.ws_col; |
| + | else if(!ioctl(STDERR_FILENO, TIOCGWINSZ, &ts)) |
| + | cols = (int)ts.ws_col; |
| #elif defined(_WIN32) && !defined(CURL_WINDOWS_UWP) | |
| { | |
| HANDLE stderr_hnd = GetStdHandle(STD_ERROR_HANDLE); | |