aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Moellmann1999-09-23 11:58:42 +0000
committerGerd Moellmann1999-09-23 11:58:42 +0000
commitda4487236dca1e604c6da02e461f1abf1ff7bb9c (patch)
tree03838b3aa1894bc7ceb1d98b222690b5891b05f6
parent57209cbae0d7346bd5180ed87709c15931c5f92f (diff)
downloademacs-da4487236dca1e604c6da02e461f1abf1ff7bb9c.tar.gz
emacs-da4487236dca1e604c6da02e461f1abf1ff7bb9c.zip
(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)
5518 5518
5519 /* Let it grow only, until we display an empty message, in which 5519 /* Let it grow only, until we display an empty message, in which
5520 case the window shrinks again. */ 5520 case the window shrinks again. */
5521 if (height > XFASTINT (w->height) 5521 if (height > XFASTINT (w->height))
5522 || exact_p
5523 || BEGV == ZV)
5524 { 5522 {
5525 Lisp_Object old_selected_window;
5526 Lisp_Object fix_window;
5527 int old_height = XFASTINT (w->height); 5523 int old_height = XFASTINT (w->height);
5528 5524 freeze_window_starts (f, 1);
5529 freeze_window_starts (f, height > XFASTINT (w->height)); 5525 grow_mini_window (w, height - XFASTINT (w->height));
5530 5526 window_height_changed_p = XFASTINT (w->height) != old_height;
5531 /* If the mini-buffer is selected, try to not change 5527 }
5532 the height of Vminibuf_scroll_window. Otherwise try 5528 else if (height < XFASTINT (w->height)
5533 to not change the height of the selected window. */ 5529 && (exact_p || BEGV == ZV))
5534 if (MINI_WINDOW_P (XWINDOW (selected_window))) 5530 {
5535 fix_window = Vminibuf_scroll_window; 5531 int old_height = XFASTINT (w->height);
5536 else 5532 freeze_window_starts (f, 0);
5537 fix_window = selected_window; 5533 shrink_mini_window (w);
5538
5539 old_selected_window = selected_window;
5540 XSETWINDOW (selected_window, w);
5541 XWINDOW (fix_window)->height_fixed_p = 1;
5542 change_window_height (height - XFASTINT (w->height), 0);
5543 XWINDOW (fix_window)->height_fixed_p = 0;
5544 selected_window = old_selected_window;
5545 window_height_changed_p = XFASTINT (w->height) != old_height; 5534 window_height_changed_p = XFASTINT (w->height) != old_height;
5546 } 5535 }
5547 } 5536 }