Check for horizontally-split windows when shrinking a window.
commit293d3311d694751eb086e983c8a69a3abd60e0cd
authorCarsten Dominik <carsten.dominik@gmail.com>
Mon, 3 Nov 2008 12:38:25 +0000 (3 13:38 +0100)
committerCarsten Dominik <carsten.dominik@gmail.com>
Mon, 3 Nov 2008 12:38:25 +0000 (3 13:38 +0100)
treebf0d0dad8957f7554804dfa3abe18147c5c10b06
parent413d9b73b0a5a4c38be8791d72e17137306c59ac
Check for horizontally-split windows when shrinking a window.

So far, Org used either `fit-window-to-buffer' or
`shrink-window-if-larger-than-buffer' without any further checks when
displaying one of its many help and selection buffers.  This can cause
problems if the user has set up Emacs to split windows horizontally
rather than vertically, because the window being shrunken then may be
side-by-side with another window, and shrinking the height of one will
also change the other.

With this patch, shrinking a window always goes through the new
function `org-fit-window-to-buffer' which only acts if the current
window spans the whole width of the frame.

Furthermore, this function also helps with compatibility, because it
falls back to `shrink-window-if-larger-than-buffer' if
`fit-window-to-buffer' does not exist, as is the case on older version
of Emacs and XEmacs.
lisp/ChangeLog
lisp/org-agenda.el
lisp/org-attach.el
lisp/org-clock.el
lisp/org-compat.el
lisp/org-exp.el
lisp/org-table.el
lisp/org.el