fix buffer size when returning from alternate screen

if the window was resized while we were in the alternate screen, it
would have resized the alternate screen buffer, but not the normal
buffer, which breaks things when we swap the normal buffer back in.