Mercurial > emacs
changeset 38793:4800b18d484f
(resize_echo_area_exactly): Don't resize the mini-window
exactly when a mini-buffer is active.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Mon, 13 Aug 2001 09:52:55 +0000 |
parents | c9b9238088f3 |
children | 47ae93b5ab9f |
files | src/xdisp.c |
diffstat | 1 files changed, 15 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/xdisp.c Mon Aug 13 09:27:43 2001 +0000 +++ b/src/xdisp.c Mon Aug 13 09:52:55 2001 +0000 @@ -6456,7 +6456,8 @@ /* Resize the echo area window to exactly the size needed for the - currently displayed message, if there is one. */ + currently displayed message, if there is one. If a mini-buffer + is active, don't shrink it. */ void resize_echo_area_exactly () @@ -6466,9 +6467,15 @@ { struct window *w = XWINDOW (echo_area_window); int resized_p; + Lisp_Object resize_exactly; + + if (minibuf_level == 0) + resize_exactly = Qt; + else + resize_exactly = Qnil; resized_p = with_echo_area_buffer (w, 0, resize_mini_window_1, - (EMACS_INT) w, Qnil, 0, 0); + (EMACS_INT) w, resize_exactly, 0, 0); if (resized_p) { ++windows_or_buffers_changed; @@ -6481,16 +6488,17 @@ /* Callback function for with_echo_area_buffer, when used from resize_echo_area_exactly. A1 contains a pointer to the window to - resize, A2 to A4 are not used. Value is what resize_mini_window - returns. */ + resize, EXACTLY non-nil means resize the mini-window exactly to the + size of the text displayed. A3 and A4 are not used. Value is what + resize_mini_window returns. */ static int -resize_mini_window_1 (a1, a2, a3, a4) +resize_mini_window_1 (a1, exactly, a3, a4) EMACS_INT a1; - Lisp_Object a2; + Lisp_Object exactly; EMACS_INT a3, a4; { - return resize_mini_window ((struct window *) a1, 1); + return resize_mini_window ((struct window *) a1, !NILP (exactly)); }