From 97cafc0f48a1e7a7409ebcd45875d79e4f3d8649 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Wed, 25 Aug 1999 21:12:40 +0000 Subject: [PATCH] (resize_mini_window): Don't resize if Vmax_mini_window_height is nil. Otherwise, use a default if Vmax_mini_window_height is not ot a number. (syms_of_xdisp): Extend documentation of Vmax_mini_window_height. --- src/xdisp.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/xdisp.c b/src/xdisp.c index 11eee2353b0..834b679e84f 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -5428,6 +5428,10 @@ resize_mini_window (w) int window_height_changed_p = 0; xassert (MINI_WINDOW_P (w)); + + /* Nil means don't try to resize. */ + if (NILP (Vmax_mini_window_height)) + return 0; if (!FRAME_MINIBUF_ONLY_P (f)) { @@ -5445,6 +5449,8 @@ resize_mini_window (w) max_height = XFLOATINT (Vmax_mini_window_height) * total_height; else if (INTEGERP (Vmax_mini_window_height)) max_height = XINT (Vmax_mini_window_height); + else + max_height = total_height / 4; /* Correct that max. height if it's bogus. */ max_height = max (1, max_height); @@ -12727,7 +12733,8 @@ displayed according to the current fontset."); DEFVAR_LISP ("max-mini-window-height", &Vmax_mini_window_height, "*Maximum height for resizing mini-windows.\n\ If a float, it specifies a fraction of the mini-window frame's height.\n\ -If an integer, it specifies a number of lines."); +If an integer, it specifies a number of lines.\n\ +If nil, don't resize."); Vmax_mini_window_height = make_float (0.25); } -- 2.39.5