aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2006-07-02 14:32:52 +0000
committerStefan Monnier2006-07-02 14:32:52 +0000
commit5937a3fdbdd3e19e1772290d718b4acaf9704e68 (patch)
tree146638cf5ef9852a3161a0a2474f5fb4c005b4cc
parente78cf8e555431e1d49209ad875bf8da6111e8bb5 (diff)
downloademacs-5937a3fdbdd3e19e1772290d718b4acaf9704e68.tar.gz
emacs-5937a3fdbdd3e19e1772290d718b4acaf9704e68.zip
(set-window-text-height): Only set window-min-height to
1 if that's the requested size.
-rw-r--r--lisp/window.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/window.el b/lisp/window.el
index ef9dd5d896d..2ae1a2c9e79 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -532,7 +532,11 @@ the height exactly, but attempts to be conservative, by allocating more
532lines than are actually needed in the case where some error may be present." 532lines than are actually needed in the case where some error may be present."
533 (let ((delta (- height (window-text-height window)))) 533 (let ((delta (- height (window-text-height window))))
534 (unless (zerop delta) 534 (unless (zerop delta)
535 (let ((window-min-height 1)) 535 ;; Setting window-min-height to a value like 1 can lead to very
536 ;; bizarre displays because it also allows Emacs to make *other*
537 ;; windows 1-line tall, which means that there's no more space for
538 ;; the modeline.
539 (let ((window-min-height (min 2 height))) ;One text line plus a modeline.
536 (if (and window (not (eq window (selected-window)))) 540 (if (and window (not (eq window (selected-window))))
537 (save-selected-window 541 (save-selected-window
538 (select-window window) 542 (select-window window)