From 7e1899d7cdcff5fe4926f5a5804abaf9f7e18b2b Mon Sep 17 00:00:00 2001 From: Martin Rudalics Date: Tue, 7 Jan 2014 18:16:24 +0100 Subject: [PATCH] Fix Bugs 16351 and 16383 when rounding in balance-windows-2. * window.el (balance-windows-2): While rounding don't give a window more than the remainder. Bug#16351, Bug#16383. --- lisp/ChangeLog | 5 +++++ lisp/window.el | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 88afaec974c..add146fd2b1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-01-07 Martin Rudalics + + * window.el (balance-windows-2): While rounding don't give a + window more than the remainder. Bug#16351, Bug#16383. + 2014-01-07 Glenn Morris * menu-bar.el (menu-bar-help-extra-packages): Remove. diff --git a/lisp/window.el b/lisp/window.el index 6ecb55aa659..d1d8a5ea79c 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -4541,7 +4541,7 @@ is non-nil)." (setq sub first) (while (and sub (> rest 0)) (unless (window--resize-child-windows-skip-p window) - (set-window-new-pixel sub char-size t) + (set-window-new-pixel sub (min rest char-size) t) (setq rest (- rest char-size))) (setq sub (window-right sub))) @@ -4550,7 +4550,7 @@ is non-nil)." (setq sub first) (while (and sub (> rest 0)) (unless (eq (window-new-normal sub) 'ignore) - (set-window-new-pixel sub char-size t) + (set-window-new-pixel sub (min rest char-size) t) (setq rest (- rest char-size))) (setq sub (window-right sub))) -- 2.11.4.GIT