1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

don't use TIOCGWINSZ terminal size if it returns only 0x0.

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2788 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2002-05-13 17:11:04 +00:00 committed by cras
parent ed966c6921
commit d68bbeb5ef

View File

@ -56,6 +56,9 @@ int term_get_size(int *width, int *height)
if (ioctl(0, TIOCGWINSZ, &ws) < 0) if (ioctl(0, TIOCGWINSZ, &ws) < 0)
return FALSE; return FALSE;
if (ws.ws_row == 0 && ws.ws_col == 0)
return FALSE;
*width = ws.ws_col; *width = ws.ws_col;
*height = ws.ws_row; *height = ws.ws_row;