Improve autoscrolling.

Change autoscrolling so that when more than a page of text is
printed at once, it doesn't autoscroll past it; the most it
will scroll is to the point where the new text is at the top.