Subject: bug#64139: 28.2; Scrolling problems in miniwindow

From: Eli Zaretskii <[email-masked]>
Date: Wed, 21 Jun 2023 18:01:27 +0300

> From: Al Petrofsky <[email-masked]>
> Date: Mon, 19 Jun 2023 18:33:38 -0400
> Cc: Juri Linkov <[email-masked]>, [email-masked]
> 
> Here's a simpler and clearer recipe that should show the problem on
> any tty or X display:
> 
>    emacs-28.2 -Q
>    M-: C-u 9 9 C-q C-j x C-@ M-< C-v
> 
> This creates a 100-line minibuffer with "x" on the last line.  After
> the M-< and C-v, we should be one windowful down from the top, but
> instead we've scrolled nearly to the end and the "x" has shown up on
> the last line.

Thanks.

This is a feature: scrolling (and redisplay in general) in the
mini-window is tailored to try and display the most important part of
the minibuffer text.  The feature is intended to support various
minibuffer-editing packages which display a lot of text in the
mini-window when the user is prompted for a file name or other similar
stuff, of which there are a lot of possible candidates.

If you set the variable redisplay-adhoc-scroll-in-resize-mini-windows
to a nil value, you will get the "normal" scrolling behavior in the
mini-window.