From 2581513abea46d41ee97ea55b22803e78efc1459 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 11 Jul 2019 16:03:33 +0300 Subject: [PATCH] Avoid assertion violations when resize-mini-windows is nil * src/xdisp.c (resize_mini_window): Always reset the mini-window's start point to the beginning of the buffer, even if resizing is not needed. This avoids assertion violations when resize-mini-windows is nil. (Bug#36595) --- src/xdisp.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/xdisp.c b/src/xdisp.c index 2711e54382d..7f0d577cebc 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -11392,17 +11392,17 @@ resize_mini_window (struct window *w, bool exact_p) if (!NILP (Vinhibit_redisplay)) return false; + /* By default, start display at the beginning. */ + set_marker_both (w->start, w->contents, + BUF_BEGV (XBUFFER (w->contents)), + BUF_BEGV_BYTE (XBUFFER (w->contents))); + /* Nil means don't try to resize. */ if ((NILP (Vresize_mini_windows) && (NILP (resize_mini_frames) || !FRAME_MINIBUF_ONLY_P (f))) || (FRAME_X_P (f) && FRAME_OUTPUT_DATA (f) == NULL)) return false; - /* By default, start display at the beginning. */ - set_marker_both (w->start, w->contents, - BUF_BEGV (XBUFFER (w->contents)), - BUF_BEGV_BYTE (XBUFFER (w->contents))); - if (FRAME_MINIBUF_ONLY_P (f)) { if (!NILP (resize_mini_frames)) -- 2.39.5