summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerd Moellmann <gerd@gnu.org>1999-09-23 11:58:42 +0000
committerGerd Moellmann <gerd@gnu.org>1999-09-23 11:58:42 +0000
commitda4487236dca1e604c6da02e461f1abf1ff7bb9c (patch)
tree03838b3aa1894bc7ceb1d98b222690b5891b05f6
parent57209cbae0d7346bd5180ed87709c15931c5f92f (diff)
downloademacs-da4487236dca1e604c6da02e461f1abf1ff7bb9c.tar.gz
(resize_mini_window): Use grow_mini_window and
shrink_mini_window.
-rw-r--r--src/xdisp.c33
1 files changed, 11 insertions, 22 deletions
diff --git a/src/xdisp.c b/src/xdisp.c
index 39fcb423a6f..e8bb7b72f73 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -5518,30 +5518,19 @@ resize_mini_window (w, exact_p)
/* Let it grow only, until we display an empty message, in which
case the window shrinks again. */
- if (height > XFASTINT (w->height)
- || exact_p
- || BEGV == ZV)
+ if (height > XFASTINT (w->height))
{
- 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;
+ freeze_window_starts (f, 1);
+ grow_mini_window (w, height - XFASTINT (w->height));
+ window_height_changed_p = XFASTINT (w->height) != old_height;
+ }
+ else if (height < XFASTINT (w->height)
+ && (exact_p || BEGV == ZV))
+ {
+ int old_height = XFASTINT (w->height);
+ freeze_window_starts (f, 0);
+ shrink_mini_window (w);
window_height_changed_p = XFASTINT (w->height) != old_height;
}
}