From: "Gary V. Vaughan" <address@hidden>
Before committing, it would be nice to find why the display always
shows just the last half-dozen lines of any large paste at the top
of the window, where prior to this patch that is not always the
case...
It should, as far as I can see, show the paste in the top half of the window, irrespective of window height, as calculated in resize_redisplay (the "else if" case).
In the original version, the window scrolling will be recomputed after every character. I guess the way to get the same result in both cases is to calculate the exact offset depending on the delta parameter to resize_redisplay, but whether that makes sense for all that function's callers I don't know.
Or you could call resize_redisplay after every inserted character, and only move the refresh code inside getkey.
--