From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#44070: 28.0.50; Minibuffer display "jumps" upon minor edit Date: Mon, 19 Oct 2020 19:34:01 +0300 Message-ID: <83a6wip43q.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28353"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 44070@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Oct 19 18:36:09 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kUY8n-0007Hu-75 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 19 Oct 2020 18:36:09 +0200 Original-Received: from localhost ([::1]:38968 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUY8m-0000tN-8b for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 19 Oct 2020 12:36:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33918) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kUY7i-0007st-SM for bug-gnu-emacs@gnu.org; Mon, 19 Oct 2020 12:35:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58850) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kUY7i-0005rG-9d for bug-gnu-emacs@gnu.org; Mon, 19 Oct 2020 12:35:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kUY7i-0006Xm-7j for bug-gnu-emacs@gnu.org; Mon, 19 Oct 2020 12:35:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 19 Oct 2020 16:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44070 X-GNU-PR-Package: emacs Original-Received: via spool by 44070-submit@debbugs.gnu.org id=B44070.160312524525062 (code B ref 44070); Mon, 19 Oct 2020 16:35:02 +0000 Original-Received: (at 44070) by debbugs.gnu.org; 19 Oct 2020 16:34:05 +0000 Original-Received: from localhost ([127.0.0.1]:42159 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kUY6n-0006WA-0A for submit@debbugs.gnu.org; Mon, 19 Oct 2020 12:34:05 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:55004) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kUY6k-0006Vf-Vt for 44070@debbugs.gnu.org; Mon, 19 Oct 2020 12:34:03 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:37471) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kUY6f-0005kH-9H; Mon, 19 Oct 2020 12:33:57 -0400 Original-Received: from [176.228.60.248] (port=4060 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kUY6e-0007kV-E3; Mon, 19 Oct 2020 12:33:56 -0400 In-Reply-To: (message from Stefan Monnier on Sun, 18 Oct 2020 18:09:55 -0400) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:191012 Archived-At: > From: Stefan Monnier > 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?