summaryrefslogtreecommitdiff
path: root/src/print.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/print.c')
-rw-r--r--src/print.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/print.c b/src/print.c
index 92c1b05..b47d8d7 100644
--- a/src/print.c
+++ b/src/print.c
@@ -31,8 +31,9 @@ int apk_get_screen_width(void)
struct winsize w;
if (apk_screen_width == 0) {
- apk_screen_width = 70;
- if (ioctl(STDERR_FILENO,TIOCGWINSZ, &w) == 0)
+ apk_screen_width = 50;
+ if (ioctl(STDERR_FILENO, TIOCGWINSZ, &w) == 0 &&
+ w.ws_col > 50)
apk_screen_width = w.ws_col;
}