From: Martin Rudalics Date: Tue, 24 Dec 2013 16:42:03 +0000 (+0100) Subject: In balance-windows-area don't call window-height and window-width. Bug#16241. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~207 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=18cee9eca2aa558bebc4ee18cb5bc0503a85d9f2;p=emacs.git In balance-windows-area don't call window-height and window-width. Bug#16241. * window.el (balance-windows-area): Call window-size instead of window-height and window-width. Bug#16241. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 79244ec160c..5402775dfbb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2013-12-24 Martin Rudalics + + * window.el (balance-windows-area): Call window-size instead of + window-height and window-width. Bug#16241. + 2013-12-24 Lars Ingebrigtsen * net/eww.el (eww-bookmark-quit): Remove. diff --git a/lisp/window.el b/lisp/window.el index 3b841747205..b58f8b85815 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -4681,12 +4681,12 @@ specific buffers." ;; (assert (eq next (or (cadr (member win wins)) (car wins)))) (let* ((horiz (< (car (window-pixel-edges win)) (car (window-pixel-edges next)))) - (areadiff (/ (- (* (window-height next pixelwise) - (window-width next pixelwise) + (areadiff (/ (- (* (window-size next nil pixelwise) + (window-size next t pixelwise) (buffer-local-value 'window-area-factor (window-buffer next))) - (* (window-height win pixelwise) - (window-width win pixelwise) + (* (window-size win nil pixelwise) + (window-size win t pixelwise) (buffer-local-value 'window-area-factor (window-buffer win)))) (max (buffer-local-value 'window-area-factor @@ -4694,10 +4694,10 @@ specific buffers." (buffer-local-value 'window-area-factor (window-buffer next))))) (edgesize (if horiz - (+ (window-height win pixelwise) - (window-height next pixelwise)) - (+ (window-width win pixelwise) - (window-width next pixelwise)))) + (+ (window-size win nil pixelwise) + (window-size next nil pixelwise)) + (+ (window-size win t pixelwise) + (window-size next t pixelwise)))) (diff (/ areadiff edgesize))) (when (zerop diff) ;; Maybe diff is actually closer to 1 than to 0.