From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#43519: 28.0.50; Overlay at end of minibuf hides minibuf's real content Date: Sat, 19 Sep 2020 15:42:12 -0400 Message-ID: References: <83wo0p1twr.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25311"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: 43519@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 19 21:43:24 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 1kJilY-0006U2-15 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Sep 2020 21:43:24 +0200 Original-Received: from localhost ([::1]:38056 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kJilX-0001Dg-1t for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Sep 2020 15:43:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:32914) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kJilC-0001DP-OW for bug-gnu-emacs@gnu.org; Sat, 19 Sep 2020 15:43:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36619) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kJilC-0007sd-FY for bug-gnu-emacs@gnu.org; Sat, 19 Sep 2020 15:43:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kJilC-0007G5-Ei for bug-gnu-emacs@gnu.org; Sat, 19 Sep 2020 15:43:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Sep 2020 19:43:02 +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.160054454327852 (code B ref 43519); Sat, 19 Sep 2020 19:43:02 +0000 Original-Received: (at 43519) by debbugs.gnu.org; 19 Sep 2020 19:42:23 +0000 Original-Received: from localhost ([127.0.0.1]:48165 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJikZ-0007FA-L9 for submit@debbugs.gnu.org; Sat, 19 Sep 2020 15:42:23 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:40160) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJikX-0007Eu-3J for 43519@debbugs.gnu.org; Sat, 19 Sep 2020 15:42:22 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 3379C810D1; Sat, 19 Sep 2020 15:42:15 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 7DEEF80921; Sat, 19 Sep 2020 15:42:13 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1600544533; bh=JfsUINXNRlG8FUCo47BsMudOSsz94Yi/71fA6fSo7xc=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=PHMR+S47ypuiMVGWQJNioaoqu7fMOZkzyyKjhipK0GG5hzhS33CtvHwklAE4Al9sd FlEBABdONLWF0Kz6bUmfaOz+YjRHE4h8kM4qv+9uztH3Joae8Li2yuyXE0teUxia1A YOUejXQI5GDKYUgg/5PlZDTgc4ounf/ePRV82LcEkc3y0d+L62AMuTBhZc1h7STuHd WJfwTB6Ks0oGC1L3PKVBZcz1s3XzcpQhQCiQJdm83WW4dXQgZeYv/nCiQfsjtC2VGs Acp0rxDq/qBUUX6z4sAR1eYWISOkEp0WTpdaqDVtNTP+9DCF38HBjVAPSJVeDnb8dl Ay/Z6lEIzXo4Q== Original-Received: from alfajor (unknown [45.72.232.131]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 46B8E1205CC; Sat, 19 Sep 2020 15:42:13 -0400 (EDT) In-Reply-To: <83wo0p1twr.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 19 Sep 2020 21:52:04 +0300") 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:188433 Archived-At: >> From: Stefan Monnier >> Date: Sat, 19 Sep 2020 13:54:13 -0400 >> >> % src/emacs -Q --eval '(setq max-mini-window-height 1)' -f icomplete-mode >> M-x a >> >> at this point, you should presumably not see the "M-x a" in your >> minibuffer window but only something of the form "{rp | lign | ..." > > Seems like a bug in icomplete: it attempts to compute the maximum > length of candidates to be displayed, but seems like it fails, because > the single mini-window line is continued, with no ellipsis at the end > of the visible line? I disagree: icomplete merely added text after point via an overlay and didn't do anything which explicitly justifies horizontal scrolling. I suspect the problem is that point is right on the overlay, so in a sense it's both before *and* after the "{...}" text. Conceptually it should be considered as being before (which is why the cursor is placed on the `{`), and the redisplay somewhat agrees with it (because it hides the end of "{...}" rather than its beginning) but not completely since it scrolled the display even though the `{` was already visible without it. > The fact that it calls window-width with no arguments is one possible > problem -- it assumes the default face's font. But I think the > problem is more prominent than just that. > > It should produce an overlay string that fits in the window, then the > prompt will be visible. That would merely work around the underlying problem (and as you know it's wickedly difficult to construct a string which will have "just the right size" to fit into the minibuffer window). Maybe there's a good reason for the redisplay to behave this way, but if that's the case we need some way for icomplete (and other similar cases) to make it behave differently. Stefan