term.c: update winsize for ncurses
TODO: note some old bugs