scrolling: use a comparison that will work also in softwrap mode

This fixes https://savannah.gnu.org/bugs/?49467.
1 file changed