aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann2001-08-13 09:52:55 +0000
committerGerd Moellmann2001-08-13 09:52:55 +0000
commit6d004fea41c6bcc9cea3730b50d7ccaba5d164c3 (patch)
tree78ddb9d8d53ac27b8e1d64c5c6dfa394396b4294 /src
parentc5cf21093ae4ee11b4385fb9d69c9cfb077e5c42 (diff)
downloademacs-6d004fea41c6bcc9cea3730b50d7ccaba5d164c3.tar.gz
emacs-6d004fea41c6bcc9cea3730b50d7ccaba5d164c3.zip
(resize_echo_area_exactly): Don't resize the mini-window
exactly when a mini-buffer is active.
Diffstat (limited to 'src')
-rw-r--r--src/xdisp.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 4d51cc4bdca..10e7abe1ddb 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -6456,7 +6456,8 @@ display_echo_area_1 (a1, a2, a3, a4)
6456 6456
6457 6457
6458/* Resize the echo area window to exactly the size needed for the 6458/* Resize the echo area window to exactly the size needed for the
6459 currently displayed message, if there is one. */ 6459 currently displayed message, if there is one. If a mini-buffer
6460 is active, don't shrink it. */
6460 6461
6461void 6462void
6462resize_echo_area_exactly () 6463resize_echo_area_exactly ()
@@ -6466,9 +6467,15 @@ resize_echo_area_exactly ()
6466 { 6467 {
6467 struct window *w = XWINDOW (echo_area_window); 6468 struct window *w = XWINDOW (echo_area_window);
6468 int resized_p; 6469 int resized_p;
6470 Lisp_Object resize_exactly;
6471
6472 if (minibuf_level == 0)
6473 resize_exactly = Qt;
6474 else
6475 resize_exactly = Qnil;
6469 6476
6470 resized_p = with_echo_area_buffer (w, 0, resize_mini_window_1, 6477 resized_p = with_echo_area_buffer (w, 0, resize_mini_window_1,
6471 (EMACS_INT) w, Qnil, 0, 0); 6478 (EMACS_INT) w, resize_exactly, 0, 0);
6472 if (resized_p) 6479 if (resized_p)
6473 { 6480 {
6474 ++windows_or_buffers_changed; 6481 ++windows_or_buffers_changed;
@@ -6481,16 +6488,17 @@ resize_echo_area_exactly ()
6481 6488
6482/* Callback function for with_echo_area_buffer, when used from 6489/* Callback function for with_echo_area_buffer, when used from
6483 resize_echo_area_exactly. A1 contains a pointer to the window to 6490 resize_echo_area_exactly. A1 contains a pointer to the window to
6484 resize, A2 to A4 are not used. Value is what resize_mini_window 6491 resize, EXACTLY non-nil means resize the mini-window exactly to the
6485 returns. */ 6492 size of the text displayed. A3 and A4 are not used. Value is what
6493 resize_mini_window returns. */
6486 6494
6487static int 6495static int
6488resize_mini_window_1 (a1, a2, a3, a4) 6496resize_mini_window_1 (a1, exactly, a3, a4)
6489 EMACS_INT a1; 6497 EMACS_INT a1;
6490 Lisp_Object a2; 6498 Lisp_Object exactly;
6491 EMACS_INT a3, a4; 6499 EMACS_INT a3, a4;
6492{ 6500{
6493 return resize_mini_window ((struct window *) a1, 1); 6501 return resize_mini_window ((struct window *) a1, !NILP (exactly));
6494} 6502}
6495 6503
6496 6504