summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util.c b/src/util.c
index a09b704ffe..f982586cee 100644
--- a/src/util.c
+++ b/src/util.c
@@ -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;
}