set window params on startup

This commit is contained in:
rsc 2005-11-30 02:31:55 +00:00
parent 02dc681a98
commit baa6e34b72
2 changed files with 9 additions and 6 deletions

View file

@ -76,9 +76,10 @@ updatewinsize(int row, int col, int dx, int dy)
ws.ws_col = col;
ws.ws_xpixel = dx;
ws.ws_ypixel = dy;
if(ws.ws_row != ows.ws_row || ws.ws_col != ows.ws_col)
if(ioctl(rcfd, TIOCSWINSZ, &ws) < 0)
fprint(2, "ioctl: %r\n");
if(ws.ws_row != ows.ws_row || ws.ws_col != ows.ws_col){
if(ioctl(rcfd, TIOCSWINSZ, &ws) < 0)
fprint(2, "ioctl: %r\n");
}
ows = ws;
}