From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 44070@debbugs.gnu.org
Subject: bug#44070: 28.0.50; Minibuffer display "jumps" upon minor edit
Date: Mon, 19 Oct 2020 19:34:01 +0300 [thread overview]
Message-ID: <83a6wip43q.fsf@gnu.org> (raw)
In-Reply-To: <jwveelvfaoc.fsf@iro.umontreal.ca> (message from Stefan Monnier on Sun, 18 Oct 2020 18:09:55 -0400)
> From: Stefan Monnier <monnier@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?
next prev parent reply other threads:[~2020-10-19 16:34 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-18 22:09 bug#44070: 28.0.50; Minibuffer display "jumps" upon minor edit Stefan Monnier
2020-10-19 16:34 ` Eli Zaretskii [this message]
2020-10-29 17:54 ` Stefan Monnier
2020-10-31 8:35 ` Eli Zaretskii
2020-10-31 13:12 ` Stefan Monnier
2020-10-31 18:40 ` Eli Zaretskii
2020-11-01 13:29 ` Stefan Monnier
2020-11-01 14:12 ` Stefan Monnier
2020-11-01 15:38 ` Eli Zaretskii
2020-11-01 18:59 ` Stefan Monnier
2020-11-01 19:36 ` Eli Zaretskii
2020-11-01 19:54 ` Stefan Monnier
2020-11-01 15:32 ` Eli Zaretskii
2020-11-01 15:38 ` Stefan Monnier
2020-11-01 15:45 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83a6wip43q.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=44070@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).