From 2913a9c09beaa82b0742033913392a77ff2b333c Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Thu, 26 Jul 2001 09:54:02 +0000 Subject: [PATCH] (resize_mini_window): Give up when inhibit-redisplay is non-nil, instead of when redisplaying_p is non-zero. See comment there. (mark_window_display_accurate_1): Add an assertion. --- src/xdisp.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/xdisp.c b/src/xdisp.c index 6a56fe18740..6b382906f58 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -1278,7 +1278,7 @@ safe_eval_handler (arg) /* Evaluate SEXPR and return the result, or nil if something went - wrong. */ + wrong. Prevent redisplay during the evaluation. */ Lisp_Object safe_eval (sexpr) @@ -1306,7 +1306,8 @@ safe_eval (sexpr) /* Call function ARGS[0] with arguments ARGS[1] to ARGS[NARGS - 1]. - Return the result, or nil if something went wrong. */ + Return the result, or nil if something went wrong. Prevent + redisplay during the evaluation. */ Lisp_Object safe_call (nargs, args) @@ -6500,10 +6501,13 @@ resize_mini_window (w, exact_p) xassert (MINI_WINDOW_P (w)); - /* Don't resize windows while redisplaying; it would confuse - redisplay functions when the size of the window they are - displaying changes from under them. */ - if (redisplaying_p) + /* Don't resize windows while redisplaying a window; it would + confuse redisplay functions when the size of the window they are + displaying changes from under them. Such a resizing can happen, + for instance, when which-func prints a long message while + we are running fontification-functions. We're running these + functions with safe_call which binds inhibit-redisplay to t. */ + if (!NILP (Vinhibit_redisplay)) return 0; /* Nil means don't try to resize. */ @@ -8981,6 +8985,9 @@ mark_window_display_accurate_1 (w, accurate_p) if (accurate_p) { w->window_end_valid = w->buffer; + xassert (XINT (w->window_end_vpos) + < (XINT (w->height) + - (WINDOW_WANTS_MODELINE_P (w) ? 1 : 0))); w->update_mode_line = Qnil; } } -- 2.39.2