bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#60015: 29.0.60; multi-line messages truncated in non-selected minibu


From: Eli Zaretskii
Subject: bug#60015: 29.0.60; multi-line messages truncated in non-selected minibuffer
Date: Thu, 15 Dec 2022 15:36:24 +0200

> Date: Thu, 15 Dec 2022 11:18:15 +0100
> Cc: 60015@debbugs.gnu.org
> From: martin rudalics <rudalics@gmx.at>
> 
>  > Here is a better test case.  Please evaluate:
>  >
>  > (progn
>  >    (keymap-global-set "C-c C-c" (lambda () (interactive) (message 
> "abc\ndef")))
>  >    nil)
>  >
>  > Then the bug can be reproduced with just these keys:
>  >
>  > M-x
>  > C-x o
>  > C-c C-c
>  >
>  > Only the top line is displayed in the minibuffer.
> 
> This is caused by resize_echo_area_exactly in xdisp.c.  If you replace
> 
>        Lisp_Object resize_exactly = (minibuf_level == 0 ? Qt : Qnil);
> 
> with
> 
>        Lisp_Object resize_exactly = Qt;
> 
> the echo area gets resized.

Are you sure this is the reason and the possible fix?  The commentary
to resize_echo_area_exactly says:

  /* Resize the echo area window to exactly the size needed for the
     currently displayed message, if there is one.  If a mini-buffer
     is active, don't shrink it.  */

which makes a lot of sense.  And resize_mini_window, which does the
job and accepts the argument you suggest to make Qt always, has this
single place where it looks at that argument (called EXACT_P):

      if (EQ (Vresize_mini_windows, Qgrow_only))
        {
          /* Let it grow only, until we display an empty message, in which
             case the window shrinks again.  */
          if (height > old_height)
            grow_mini_window (w, height - old_height);
          else if (height < old_height && (exact_p || BEGV == ZV))
            shrink_mini_window (w);
        }

So this argument cannot have any effect on enlarging the mini-window,
only on shrinking it.  Or am I missing something?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]