unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#33254: 26.1.50; Fixed-size windows break 'balance-windows'
@ 2018-11-04 10:18 martin rudalics
  2018-11-04 13:02 ` Eli Zaretskii
  0 siblings, 1 reply; 9+ messages in thread
From: martin rudalics @ 2018-11-04 10:18 UTC (permalink / raw)
  To: 33254

[-- Attachment #1: Type: text/plain, Size: 497 bytes --]

I have been informed about the existence of this bug by Akio Burns.
Unfortunately, he has not reacted so far to my request to file a bug
report so I'm sloppily doing this here instead:

With emacs -Q type C-x 2 C-x 2 C-x b RET

This should put you in the *Messages* buffer.  Now do

M-: (setq window-size-fixed t)

followed by

M-: (balance-windows)

Window sizes remain unchanged.  The attached patch should fix that.  I
would like to apply it to the release branch.  Objections?

Thanks, martin

[-- Attachment #2: balance-windows.diff --]
[-- Type: text/plain, Size: 790 bytes --]

diff --git a/lisp/window.el b/lisp/window.el
index f96c887..03e0c96 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -5305,11 +5305,12 @@ balance-windows-2
 	 (total-sum parent-size)
 	 failed size sub-total sub-delta sub-amount rest)
     (while sub
-      (setq number-of-children (1+ number-of-children))
-      (when (window-size-fixed-p sub horizontal)
-	(setq total-sum
-	      (- total-sum (window-size sub horizontal t)))
-	(set-window-new-normal sub 'ignore))
+      (if (window-size-fixed-p sub horizontal)
+          (progn
+            (setq total-sum
+	          (- total-sum (window-size sub horizontal t)))
+	    (set-window-new-normal sub 'ignore))
+        (setq number-of-children (1+ number-of-children)))
       (setq sub (window-right sub)))
 
     (setq failed t)


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-12-08  8:43 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-04 10:18 bug#33254: 26.1.50; Fixed-size windows break 'balance-windows' martin rudalics
2018-11-04 13:02 ` Eli Zaretskii
2018-11-04 13:32   ` martin rudalics
2018-11-04 14:52     ` Eli Zaretskii
2018-11-04 15:46       ` martin rudalics
2018-11-04 17:15         ` Eli Zaretskii
2018-11-05  9:33           ` martin rudalics
2018-11-05 15:53             ` Eli Zaretskii
2018-12-08  8:43             ` martin rudalics

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).