Mercurial > emacs
changeset 32737:29a87f28cd51
(fit-window-to-buffer): Change defaulting of MAX-HEIGHT slightly.
author | Miles Bader <miles@gnu.org> |
---|---|
date | Sun, 22 Oct 2000 04:20:17 +0000 |
parents | 2f62b75a643d |
children | 0b777485ae55 |
files | lisp/window.el |
diffstat | 1 files changed, 3 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/window.el Sun Oct 22 04:18:14 2000 +0000 +++ b/lisp/window.el Sun Oct 22 04:20:17 2000 +0000 @@ -442,6 +442,8 @@ (when (null window) (setq window (selected-window))) + (when (null max-height) + (setq max-height (frame-height (window-frame window)))) (let* ((window-height ;; The current height of WINDOW @@ -458,11 +460,7 @@ (delta ;; Calculate how much the window height has to change to show ;; text-height lines, constrained by MIN-HEIGHT and MAX-HEIGHT. - (- (max (min (+ text-height extra) - (or max-height - (frame-height - (window-frame - (or window (selected-window)))))) + (- (max (min (+ text-height extra) max-height) (or min-height window-min-height)) window-height)) ;; We do our own height checking, so avoid any restrictions due to