From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gregory Heytings via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#43519: 28.0.50; Overlay at end of minibuf hides minibuf's real content Date: Sun, 20 Sep 2020 19:50:33 +0000 Message-ID: References: Reply-To: Gregory Heytings Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20323"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Alpine 2.22 (NEB 394 2020-01-19) To: 43519@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Sep 23 17:18:18 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 1kL6XC-0005At-7U for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 23 Sep 2020 17:18:18 +0200 Original-Received: from localhost ([::1]:37550 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kL6XB-00022V-4F for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 23 Sep 2020 11:18:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34190) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kL6U7-0007i1-1s for bug-gnu-emacs@gnu.org; Wed, 23 Sep 2020 11:15:08 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54181) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kL6U1-0004EX-SE for bug-gnu-emacs@gnu.org; Wed, 23 Sep 2020 11:15:06 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kL6U1-0007Z4-Lp for bug-gnu-emacs@gnu.org; Wed, 23 Sep 2020 11:15:01 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Gregory Heytings Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 23 Sep 2020 15:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43519 X-GNU-PR-Package: emacs Original-Received: via spool by 43519-submit@debbugs.gnu.org id=B43519.160087407028953 (code B ref 43519); Wed, 23 Sep 2020 15:15:01 +0000 Original-Received: (at 43519) by debbugs.gnu.org; 23 Sep 2020 15:14:30 +0000 Original-Received: from localhost ([127.0.0.1]:37482 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kL6TW-0007Wv-39 for submit@debbugs.gnu.org; Wed, 23 Sep 2020 11:14:30 -0400 Original-Received: from mx.sdf.org ([205.166.94.24]:51827) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kL6TR-0007Wc-8h for 43519@debbugs.gnu.org; Wed, 23 Sep 2020 11:14:28 -0400 Original-Received: from sdf.org (IDENT:smmsp@faeroes.freeshell.org [205.166.94.9]) by mx.sdf.org (8.15.2/8.14.5) with ESMTPS id 08NFEGVH000557 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits) verified NO); Wed, 23 Sep 2020 15:14:24 GMT Original-Received: (from ghe@localhost) by sdf.org (8.15.2/8.12.8/Submit) id 08KJotFA016919; Sun, 20 Sep 2020 19:50:55 GMT 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:188793 Archived-At: After some further analysis, the problem here is in resize_mini_window(). In the comments one finds: "Set W->start to the right place to begin display. If the whole contents fit, start at the beginning. Otherwise, start so as to make the end of the contents appear. This is particularly important for y-or-n-p, but seems desirable generally." I won't judge the "seems desirable generally", but in this case at least it is clearly not desirable, so there should be a way to do something else. More precisely, in this case height > max_height, so init_iterator (&it, w, ZV, ZV_BYTE, NULL, DEFAULT_FACE_ID); is called, followed by move_it_vertically_backward (&it, height - unit); which does nothing given that height == unit, so start is set to ZV. What I would suggest is to add a user option to set start to BEGV when height > max_height, which is what is needed here. It would be reset to nil in read_minibuf() before calling minibuffer-setup-hook, and would be used in resize_mini_window() as follows: /* Compute a suitable window start. */ if (height > max_height && !EQ (Vstart_display_at_beginning_of_minibuffer, Qt)) This would not break any existing behavior. Would this be a good way to solve that problem?