GNU bug report logs - #44070
28.0.50; Minibuffer display "jumps" upon minor edit

Previous Next

Package: emacs;

Reported by: Stefan Monnier <monnier <at> iro.umontreal.ca>

Date: Sun, 18 Oct 2020 22:11:01 UTC

Severity: normal

Found in version 28.0.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 44070 <at> debbugs.gnu.org
Subject: bug#44070: 28.0.50; Minibuffer display "jumps" upon minor edit
Date: Mon, 19 Oct 2020 19:34:01 +0300
> From: Stefan Monnier <monnier <at> iro.umontreal.ca>
> Date: Sun, 18 Oct 2020 18:09:55 -0400
> 
> diff --git a/lisp/simple.el b/lisp/simple.el
> index d6fce922c4..41aba2ddc3 100644
> --- a/lisp/simple.el
> +++ b/lisp/simple.el
> @@ -1129,7 +1129,7 @@ end-of-buffer
>  	 ;; If the end of the buffer is not already on the screen,
>  	 ;; then scroll specially to put it near, but not at, the bottom.
>  	 (overlay-recenter (point))
> -	 (recenter -3))))
> +	 (recenter (if (window-minibuffer-p) -1 -3)))))

This should have a comment that explains the reason for the
difference.  (Btw, does this DTRT when the text in the minibuffer has
a newline at the end?)

> --- a/src/xdisp.c
> +++ b/src/xdisp.c
> @@ -18820,6 +18820,7 @@ redisplay_window (Lisp_Object window, bool just_this_one_p)
>  
>    /* Try to scroll by specified few lines.  */
>    if ((0 < scroll_conservatively
> +       || MINI_WINDOW_P (w)
>         || 0 < emacs_scroll_step
>         || temp_scroll_step
>         || NUMBERP (BVAR (current_buffer, scroll_up_aggressively))
> @@ -18830,7 +18831,9 @@ redisplay_window (Lisp_Object window, bool just_this_one_p)
>        /* The function returns -1 if new fonts were loaded, 1 if
>  	 successful, 0 if not successful.  */
>        int ss = try_scrolling (window, just_this_one_p,
> -			      scroll_conservatively,
> +			      (MINI_WINDOW_P (w)
> +			       ? SCROLL_LIMIT + 1
> +			       : scroll_conservatively),
>  			      emacs_scroll_step,
>  			      temp_scroll_step, last_line_misfit);
>        switch (ss)

If we want the minibuffer behave as if scroll-conservatively was set,
why not simply set scroll-conservatively in each minibuffer?  We could
then have a user option, by default on, to do that, and let users who
like the current (mis)behavior continue having that.  As a nice bonus,
we will then be sure the change doesn't affect echo-area messages,
only editing in the minibuffer.

WDYT?




This bug report was last modified 4 years and 254 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.