util: look at STDOUT, not STDIN, when determining tty columns
https://bugzilla.redhat.com/show_bug.cgi?id=626891
This commit is contained in:
parent
dd6c17b159
commit
9ed95f4336
|
@ -2988,7 +2988,7 @@ int columns(void) {
|
|||
struct winsize ws;
|
||||
zero(ws);
|
||||
|
||||
if (ioctl(STDIN_FILENO, TIOCGWINSZ, &ws) >= 0)
|
||||
if (ioctl(STDOUT_FILENO, TIOCGWINSZ, &ws) >= 0)
|
||||
parsed_columns = ws.ws_col;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue