[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 15c61cb359: Init 'rest' in 'balance-windows-2' (Bug#54380)
From: |
Martin Rudalics |
Subject: |
master 15c61cb359: Init 'rest' in 'balance-windows-2' (Bug#54380) |
Date: |
Mon, 14 Mar 2022 05:27:33 -0400 (EDT) |
branch: master
commit 15c61cb359bc0021f14fbcc5a2e0eb71fe0261ab
Author: Martin Rudalics <rudalics@gmx.at>
Commit: Martin Rudalics <rudalics@gmx.at>
Init 'rest' in 'balance-windows-2' (Bug#54380)
* lisp/window.el (balance-windows-2): Give 'rest' an initial
value (Bug#54380).
---
lisp/window.el | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/lisp/window.el b/lisp/window.el
index 54c9eee5f3..dd297a3169 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -5698,12 +5698,12 @@ right, if any."
;;; Balancing windows.
;; The following routine uses the recycled code from an old version of
-;; `window--resize-child-windows'. It's not very pretty, but coding it the
way the
-;; new `window--resize-child-windows' code does would hardly make it any
shorter or
-;; more readable (FWIW we'd need three loops - one to calculate the
-;; minimum sizes per window, one to enlarge or shrink windows until the
-;; new parent-size matches, and one where we shrink the largest/enlarge
-;; the smallest window).
+;; `window--resize-child-windows'. It's not very pretty, but coding it
+;; the way the new `window--resize-child-windows' code does would hardly
+;; make it any shorter or more readable (FWIW we'd need three loops -
+;; one to calculate the minimum sizes per window, one to enlarge or
+;; shrink windows until the new parent-size matches, and one where we
+;; shrink the largest/enlarge the smallest window).
(defun balance-windows-2 (window horizontal)
"Subroutine of `balance-windows-1'.
WINDOW must be a vertical combination (horizontal if HORIZONTAL
@@ -5714,9 +5714,10 @@ is non-nil)."
(first (window-child window))
(sub first)
(number-of-children 0)
+ (rest 0)
(parent-size (window-new-pixel window))
(total-sum parent-size)
- failed size sub-total sub-delta sub-amount rest)
+ failed size sub-total sub-delta sub-amount)
(while sub
(if (window-size-fixed-p sub horizontal)
(progn
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 15c61cb359: Init 'rest' in 'balance-windows-2' (Bug#54380),
Martin Rudalics <=