Subject: Re: bug#7910: 23.2; inconsistent scrolling

From: Lars Ingebrigtsen <[email-masked]>
Date: Wed, 09 Dec 2020 13:38:05 +0100

Eli Zaretskii <[email-masked]> writes:

> It's according to the doc string, AFAICT.  If the OP wants the cursor
> to _always_ retain its screen position, he should set
> scroll-preserve-screen-position to a non-nil. non-t value.

Setting the variable to `always' works for me, but the doc string is
misleading here.

---
A value of t means point keeps its screen position if the scroll
command moved it vertically out of the window, e.g. when scrolling
by full screens.
---

If you're on the next-to-last line, `C-v' will not move point out of the
window -- the next-to-last line will end up as the first line.

And there's further peculiarities with the t setting -- if you're at the
next-to-last visual line, `C-v' will put point on the first visual
line.  `C-v' again, and it's on the next-to-last line again.  So it'll
alternate first/next-to-last after every `C-v'.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no