From c0c64ad12135c8d9e586b98664b85d4924042492 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Thu, 16 Sep 1999 12:52:27 +0000 Subject: [PATCH] (resize_mini_window): Temporarily set the selected window's or Vminibuf_scroll_window's height to "fixed" around the call the change_window_height. --- src/xdisp.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/xdisp.c b/src/xdisp.c index d3f20c0b0f..5ea3f60f96 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -5507,12 +5507,24 @@ resize_mini_window (w, exact_p) || BEGV == ZV) { Lisp_Object old_selected_window; + Lisp_Object fix_window; int old_height = XFASTINT (w->height); freeze_window_starts (f, height > XFASTINT (w->height)); + + /* If the mini-buffer is selected, try to not change + the height of Vminibuf_scroll_window. Otherwise try + to not change the height of the selected window. */ + if (MINI_WINDOW_P (XWINDOW (selected_window))) + fix_window = Vminibuf_scroll_window; + else + fix_window = selected_window; + old_selected_window = selected_window; XSETWINDOW (selected_window, w); + XWINDOW (fix_window)->height_fixed_p = 1; change_window_height (height - XFASTINT (w->height), 0); + XWINDOW (fix_window)->height_fixed_p = 0; selected_window = old_selected_window; window_height_changed_p = XFASTINT (w->height) != old_height; } -- 2.20.1