Subject: bug#7910: 23.2; inconsistent scrolling

From: Eli Zaretskii <[email-masked]>
Date: Tue, 08 Dec 2020 20:31:35 +0200

> From: Lars Ingebrigtsen <[email-masked]>
> Date: Tue, 08 Dec 2020 16:46:20 +0100
> Cc: [email-masked]
> 
> emacs -Q src/alloc.c
> M-: (setq scroll-preserve-screen-position t) RET
> 
> Then move point down to the next-to-last line
> 
> Then hit `C-v':
> 
> Point is moved to the first visible line in the window instead of
> remaining at the next-to-last line.
> 
> If you do this anywhere else in the buffer (except the last two lines
> (and the first two lines)), the visual point is kept the same place.
> 
> I don't use this setting myself, so I'm wondering -- is this intended
> behaviour (i.e., sorta not using the setting on the two first/last
> lines), or is this a bug?

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.