Try to make page-up + page-down place the cursor back in its old place

Closes #1291