]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix assertion failure in window_box_height (Bug#45737)
authorMartin Rudalics <rudalics@gmx.at>
Sun, 10 Jan 2021 10:20:56 +0000 (11:20 +0100)
committerMartin Rudalics <rudalics@gmx.at>
Sun, 10 Jan 2021 10:20:56 +0000 (11:20 +0100)
* lisp/window.el (window-sizable): Don't try to grow a mini window
when the root window's minimum height is already larger than its
actual height (Bug#45737).

lisp/window.el

index 11b56d0820cbc3d7d409c67f249e5526ba5f5772..f388f863725bb866181eb0df686e15543b4be433 100644 (file)
@@ -1716,9 +1716,11 @@ interpret DELTA as pixels."
   (setq window (window-normalize-window window))
   (cond
    ((< delta 0)
-    (max (- (window-min-size window horizontal ignore pixelwise)
-           (window-size window horizontal pixelwise))
-        delta))
+    (let ((min-size (window-min-size window horizontal ignore pixelwise))
+          (size (window-size window horizontal pixelwise)))
+      (if (<= size min-size)
+          0
+        (max (- min-size size) delta))))
    ((> delta 0)
     (if (window-size-fixed-p window horizontal ignore)
        0