From: Martin Rudalics Date: Tue, 7 Jan 2014 17:16:24 +0000 (+0100) Subject: Fix Bugs 16351 and 16383 when rounding in balance-windows-2. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~27 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7e1899d7cdcff5fe4926f5a5804abaf9f7e18b2b;p=emacs.git 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. --- 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)))