aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Rudalics2012-08-25 16:52:02 +0200
committerMartin Rudalics2012-08-25 16:52:02 +0200
commit9aba119d72dde74a86d436f6e4f934baa37ecbe9 (patch)
tree0b4299c3fdaea5148f3d4c45b3284c7711e0cd9b
parent8966cbffe86e91f5eb47fdf88f0377ba10a9726c (diff)
downloademacs-9aba119d72dde74a86d436f6e4f934baa37ecbe9.tar.gz
emacs-9aba119d72dde74a86d436f6e4f934baa37ecbe9.zip
Handle evening window heights more correctly (Bug#11880) and (Bug#12091).
* window.el (window--even-window-heights): Even heights when WINDOW and the selected window form a vertical combination. (display-buffer-use-some-window): Provide that window used gets sized back by quit-window. (Bug#11880) and (Bug#12091)
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/window.el35
2 files changed, 23 insertions, 19 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 5236ad55903..94ad0badad0 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
12012-08-25 Martin Rudalics <rudalics@gmx.at>
2
3 * window.el (window--even-window-heights): Even heights when
4 WINDOW and the selected window form a vertical combination.
5 (display-buffer-use-some-window): Provide that window used gets
6 sized back by quit-window. (Bug#11880) and (Bug#12091)
7
12012-08-24 Paul Eggert <eggert@cs.ucla.edu> 82012-08-24 Paul Eggert <eggert@cs.ucla.edu>
2 9
3 Fix file time stamp problem with bzr and CVS (Bug#12001). 10 Fix file time stamp problem with bzr and CVS (Bug#12001).
diff --git a/lisp/window.el b/lisp/window.el
index 8f402f0c2b9..8aee27f44e8 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -4911,23 +4911,19 @@ Do this only if these windows are vertically adjacent to each
4911other, `even-window-heights' is non-nil, and the selected window 4911other, `even-window-heights' is non-nil, and the selected window
4912is higher than WINDOW." 4912is higher than WINDOW."
4913 (when (and even-window-heights 4913 (when (and even-window-heights
4914 (not (eq window (selected-window))) 4914 ;; Even iff WINDOW forms a vertical combination with the
4915 ;; Don't resize minibuffer windows. 4915 ;; selected window, and WINDOW's height exceeds that of the
4916 (not (window-minibuffer-p (selected-window))) 4916 ;; selected window, see also bug#11880.
4917 (> (window-height (selected-window)) (window-height window)) 4917 (window-combined-p window)
4918 (eq (window-frame window) (window-frame (selected-window))) 4918 (= (window-child-count (window-parent window)) 2)
4919 (let ((sel-edges (window-edges (selected-window))) 4919 (eq (window-parent) (window-parent window))
4920 (win-edges (window-edges window))) 4920 (> (window-total-height) (window-total-height window)))
4921 (and (= (nth 0 sel-edges) (nth 0 win-edges)) 4921 ;; Don't throw an error if we can't even window heights for
4922 (= (nth 2 sel-edges) (nth 2 win-edges)) 4922 ;; whatever reason.
4923 (or (= (nth 1 sel-edges) (nth 3 win-edges)) 4923 (condition-case nil
4924 (= (nth 3 sel-edges) (nth 1 win-edges)))))) 4924 (enlarge-window
4925 (let ((window-min-height 1)) 4925 (/ (- (window-total-height window) (window-total-height)) 2))
4926 ;; Don't throw an error if we can't even window heights for 4926 (error nil))))
4927 ;; whatever reason.
4928 (condition-case nil
4929 (enlarge-window (/ (- (window-height window) (window-height)) 2))
4930 (error nil)))))
4931 4927
4932(defun window--display-buffer (buffer window type &optional dedicated) 4928(defun window--display-buffer (buffer window type &optional dedicated)
4933 "Display BUFFER in WINDOW and make its frame visible. 4929 "Display BUFFER in WINDOW and make its frame visible.
@@ -5334,8 +5330,9 @@ that frame."
5334 window)) 5330 window))
5335 (get-largest-window 0 not-this-window)))) 5331 (get-largest-window 0 not-this-window))))
5336 (when (window-live-p window) 5332 (when (window-live-p window)
5337 (window--even-window-heights window) 5333 (prog1
5338 (prog1 (window--display-buffer buffer window 'reuse) 5334 (window--display-buffer buffer window 'reuse)
5335 (window--even-window-heights window)
5339 (unless (cdr (assq 'inhibit-switch-frame alist)) 5336 (unless (cdr (assq 'inhibit-switch-frame alist))
5340 (window--maybe-raise-frame (window-frame window))))))) 5337 (window--maybe-raise-frame (window-frame window)))))))
5341 5338