Commit dd923ed0 authored by Timo Teräs's avatar Timo Teräs

print: minimum screen width of 50

parent 073df819
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment