$OpenBSD: patch-src_screen_c,v 1.2 2010/04/05 19:05:11 landry Exp $ --- src/screen.c.orig Sun Jan 17 16:54:56 2010 +++ src/screen.c Sun Mar 21 08:36:06 2010 @@ -47,6 +47,7 @@ #include #include #include +#include #ifndef NCMPC_MINI /** welcome message time [s] */ @@ -200,6 +201,13 @@ screen_exit(void) void screen_resize(struct mpdclient *c) { + struct winsize ws; + + if (ioctl(fileno(stdout), TIOCGWINSZ, &ws) == 0) { + LINES = ws.ws_row; + COLS = ws.ws_col; + } + if (COLS