aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2019-12-30 18:00:17 +0200
committerEli Zaretskii2019-12-30 18:00:17 +0200
commite3ec84fd7d91c9fff756e28d14ce33f7a37ac19f (patch)
treedc88edcf9bbbddbd7ce22c3b7426febc2808c48f /src
parent450633f85ae336e8a23241ec3ca5de5d8de8dcdd (diff)
downloademacs-e3ec84fd7d91c9fff756e28d14ce33f7a37ac19f.tar.gz
emacs-e3ec84fd7d91c9fff756e28d14ce33f7a37ac19f.zip
Ensure mini-window is resized to show active minibuffer contents
* src/keyboard.c (read_char, command_loop_1): Resize the mini-window after clearing the echo area while minibuffer is active. (Bug#38645)
Diffstat (limited to 'src')
-rw-r--r--src/keyboard.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index 4cf1f64b487..cb311efd7e5 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -1318,6 +1318,11 @@ command_loop_1 (void)
1318 message1 (0); 1318 message1 (0);
1319 safe_run_hooks (Qecho_area_clear_hook); 1319 safe_run_hooks (Qecho_area_clear_hook);
1320 1320
1321 /* We cleared the echo area, and the minibuffer will now
1322 show, so resize the mini-window in case the minibuffer
1323 needs more or less space than the echo area. */
1324 resize_mini_window (XWINDOW (minibuf_window), false);
1325
1321 unbind_to (count, Qnil); 1326 unbind_to (count, Qnil);
1322 1327
1323 /* If a C-g came in before, treat it as input now. */ 1328 /* If a C-g came in before, treat it as input now. */
@@ -2989,6 +2994,16 @@ read_char (int commandflag, Lisp_Object map,
2989 { 2994 {
2990 safe_run_hooks (Qecho_area_clear_hook); 2995 safe_run_hooks (Qecho_area_clear_hook);
2991 clear_message (1, 0); 2996 clear_message (1, 0);
2997 /* If we were showing the echo-area message on top of an
2998 active minibuffer, resize the mini-window, since the
2999 minibuffer may need more or less space than the echo area
3000 we've just wiped. */
3001 if (minibuf_level
3002 && EQ (minibuf_window, echo_area_window)
3003 /* The case where minibuffer-message-timeout is a number
3004 was already handled near the beginning of command_loop_1. */
3005 && !NUMBERP (Vminibuffer_message_timeout))
3006 resize_mini_window (XWINDOW (minibuf_window), false);
2992 } 3007 }
2993 else if (FUNCTIONP (Vclear_message_function)) 3008 else if (FUNCTIONP (Vclear_message_function))
2994 clear_message (1, 0); 3009 clear_message (1, 0);