]> git.eshelyaron.com Git - emacs.git/commitdiff
Avoid assertion violations when resize-mini-windows is nil
authorEli Zaretskii <eliz@gnu.org>
Thu, 11 Jul 2019 13:03:33 +0000 (16:03 +0300)
committerEli Zaretskii <eliz@gnu.org>
Thu, 11 Jul 2019 13:03:33 +0000 (16:03 +0300)
* 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

index 2711e54382daedb1e00990fb9efbad056849d744..7f0d577cebc1c3075cd48351d69be52dfda5bf20 100644 (file)
@@ -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))