Adjust scroll past end height logic

This will work properly even with very long lines and soft wrap.

Fixes #869