]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix bug#69140
authorPo Lu <luangruo@yahoo.com>
Fri, 23 Feb 2024 02:18:17 +0000 (10:18 +0800)
committerEshel Yaron <me@eshelyaron.com>
Wed, 28 Feb 2024 17:40:16 +0000 (18:40 +0100)
* src/window.c (grow_mini_window): Don't adjust frame matrices
or force redisplay if the provided window cannot be
resized.  (bug#69140)

(cherry picked from commit b868690feff44c7242c942490d1d8bc6d2811fa2)

src/window.c

index 565ad00804f58cf2a5c4148d8acce7f5ddc1e43f..0c84b4f4bf3ead16edb208b8ddcb1f0664abc706 100644 (file)
@@ -5380,7 +5380,14 @@ grow_mini_window (struct window *w, int delta)
       grow = call3 (Qwindow__resize_root_window_vertically,
                    root, make_fixnum (- delta), Qt);
 
-      if (FIXNUMP (grow) && window_resize_check (r, false))
+      if (FIXNUMP (grow)
+         /* It might be impossible to resize the window, in which case
+            calling resize_mini_window_apply will set off an infinite
+            loop where the redisplay cycle so forced returns to
+            resize_mini_window, making endless attempts to expand the
+            minibuffer window to this impossible size.  (bug#69140) */
+         && XFIXNUM (grow) != 0
+         && window_resize_check (r, false))
        resize_mini_window_apply (w, -XFIXNUM (grow));
     }
 }