GNU bug report logs - #24293
25.1; Display bug: icomplete prompt not visible with icomplete-separator "\n"

Previous Next

Package: emacs;

Reported by: Michael Heerdegen <michael_heerdegen <at> web.de>

Date: Tue, 23 Aug 2016 15:45:02 UTC

Severity: minor

Found in version 25.1

Done: Michael Heerdegen <michael_heerdegen <at> web.de>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 24293 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Michael Heerdegen <michael_heerdegen <at> web.de>
Cc: 24293 <at> debbugs.gnu.org
Subject: Re: 25.1;
 Display bug: icomplete prompt not visible with icomplete-separator
 "\n"
Date: Tue, 23 Aug 2016 19:18:48 +0300
> From: Michael Heerdegen <michael_heerdegen <at> web.de>
> Cc: Eli Zaretskii <eliz <at> gnu.org>
> Date: Tue, 23 Aug 2016 17:44:12 +0200
> 
> In emacs -Q, eval
> 
>   (setq icomplete-separator "\n")
> 
> and do
> 
>   M-x icomplete-mode <return>
> 
> Then, e.g.
> 
>   M-x m
> 
> The icomplete minibuffer prompt is invisible (bug).
> 
> But you see that it's "there" when you hit <left>.  And changing the
> value of `resize-mini-windows' to nil makes the issue disappear - so I
> think this is caused by a problem in the display code.

Surprisingly, stepping through the code with a debugger reveals that
this is not a bug, but (almost) deliberate behavior.  Set
max-mini-window-height to 0.9, and you will see the entire prompt.

The default value of that variable is 0.25, so Emacs doesn't resize
mini-windows to more than 1/4th of the height of the frame's root
window.  And the height required to show the prompt is much larger in
this case.  So the mini-window is only resized to 9 lines, and Emacs
then attempts to show the last part of the minibuffer text that fits
in the mini-window.  You can see this in action if you evaluate this:

  (message "1\n2\n3\n4\n5\n6\n7\n8\n9\n0\n1\n")

What happens next is that the after-string causes the display to start
at the beginning of the string, because Emacs cannot start the
window's display in the middle of an overlay string.  So what is
actually shown is not the end, but the middle of the overlay string.

Not sure what, if anything, to do with this.  IMO, in this situation
showing anything at all will not serve the user well enough, so I tend
to do nothing and argue that displaying minibuffer text that requires
so many lines cannot possibly work well anyway, and when the text ends
with a multi-line overlay string, we hit a limitation of the display
engine.

Thanks.




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

Previous Next


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