]> code.delx.au - gnu-emacs/commitdiff
In ‘adjust-window-trailing-edge’ fix bug with size-preserved windows.
authorMartin Rudalics <rudalics@gmx.at>
Sat, 22 Aug 2015 08:22:26 +0000 (10:22 +0200)
committerMartin Rudalics <rudalics@gmx.at>
Sat, 22 Aug 2015 08:22:26 +0000 (10:22 +0200)
* lisp/window.el (adjust-window-trailing-edge): Fix bug where this
function refused to resize a size-preserved window.

ChangeLog.2
lisp/window.el

index 3a93fda6f67e9cd8ab2f9c9e442b7b9a2205081f..242cf6b59a0c2b5ed649e8a40d9d3eeb484312ba 100644 (file)
 
 2015-06-18  Martin Rudalics  <rudalics@gmx.at>
 
-       Fix last fix"
-
        Set image_cache_refcount before x_default_parameter calls.  (Bug#20802)
        * src/nsfns.m (Fx_create_frame):
        * src/xfns.c (Fx_create_frame, x_create_tip_frame): Move setting
index d39c70186013af38966a8dd76b4aaf79d9b3f8f4..f198d78cc4cc5f3aa072c3db45907f9a4f3adaea 100644 (file)
@@ -3160,7 +3160,7 @@ move it as far as possible in the desired direction."
   (let* ((frame (window-frame window))
         (minibuffer-window (minibuffer-window frame))
         (right window)
-        left this-delta min-delta max-delta ignore)
+        left first-left first-right this-delta min-delta max-delta ignore)
 
     (unless pixelwise
       (setq pixelwise t)
@@ -3188,6 +3188,7 @@ move it as far as possible in the desired direction."
      (t
       ;; Set LEFT to the first resizable window on the left.  This step is
       ;; needed to handle fixed-size windows.
+      (setq first-left left)
       (while (and left
                  (or (window-size-fixed-p left horizontal)
                      (and (< delta 0)
@@ -3200,8 +3201,10 @@ move it as far as possible in the desired direction."
                                (not (window-combined-p left horizontal))))
                    (window-left left)))))
       (unless left
+       ;; We have to resize a size-preserved window.  Start again with
+       ;; the window initially on the left.
        (setq ignore 'preserved)
-       (setq left window)
+       (setq left first-left)
        (while (and left
                    (or (window-size-fixed-p left horizontal 'preserved)
                        (<= (window-size left horizontal t)
@@ -3220,6 +3223,7 @@ move it as far as possible in the desired direction."
 
       ;; Set RIGHT to the first resizable window on the right.  This step
       ;; is needed to handle fixed-size windows.
+      (setq first-right right)
       (while (and right
                  (or (window-size-fixed-p right horizontal)
                      (and (> delta 0)
@@ -3232,12 +3236,14 @@ move it as far as possible in the desired direction."
                                (not (window-combined-p right horizontal))))
                    (window-right right)))))
       (unless right
+       ;; We have to resize a size-preserved window.  Start again with
+       ;; the window initially on the right.
        (setq ignore 'preserved)
-       (setq right (window-right window))
+       (setq right first-right)
        (while (and right
                    (or (window-size-fixed-p right horizontal 'preserved))
                    (<= (window-size right horizontal t)
-                       (window-min-size right horizontal nil t)))
+                       (window-min-size right horizontal 'preserved t)))
          (setq right
                (or (window-right right)
                    (progn