Subject: bug#53275: 29.0.50; Cursor shows up at the middle of the screen after window start is forced when vscroll is set

From: Po Lu <[email-masked]>
Date: Sat, 15 Jan 2022 15:52:50 +0800

Eli Zaretskii <[email-masked]> writes:

>>   (progn
>>     (set-window-vscroll nil 30 t)
>>     (redisplay)
>>     (set-window-start nil (point-max)))

> Sorry, I missed the "M-<" part.  With it, the behavior is
> reproducible, but I'm not sure I understand what is "the correct
> position" of the cursor in this case

It should show up where point is, which in this case is at the window
start.

> or why does it matter what Emacs does in that case (except that it
> should not crash).

Precision scrolling relies on this: when the buffer cannot be scrolled
downwards sufficiently, it sets the window start to point-max and
redisplays, which right now results in the cursor being displayed in the
middle of the screen until the next redisplay.

Thanks.