summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/main.c b/main.c
index 4083ffaf..4dc73df1 100644
--- a/main.c
+++ b/main.c
@@ -321,7 +321,8 @@ main(int argc, char *argv[])
if (use_pager &&
(conf.output.width == 0 || conf.output.indent == 0) &&
- ioctl(STDOUT_FILENO, TIOCGWINSZ, &ws) != -1) {
+ ioctl(STDOUT_FILENO, TIOCGWINSZ, &ws) != -1 &&
+ ws.ws_col > 1) {
if (conf.output.width == 0 && ws.ws_col < 79)
conf.output.width = ws.ws_col - 1;
if (conf.output.indent == 0 && ws.ws_col < 66)