summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2006-07-02 14:32:52 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2006-07-02 14:32:52 +0000
commit5937a3fdbdd3e19e1772290d718b4acaf9704e68 (patch)
tree146638cf5ef9852a3161a0a2474f5fb4c005b4cc
parente78cf8e555431e1d49209ad875bf8da6111e8bb5 (diff)
downloademacs-5937a3fdbdd3e19e1772290d718b4acaf9704e68.tar.gz
(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
lines than are actually needed in the case where some error may be present."
(let ((delta (- height (window-text-height window))))
(unless (zerop delta)
- (let ((window-min-height 1))
+ ;; Setting window-min-height to a value like 1 can lead to very
+ ;; bizarre displays because it also allows Emacs to make *other*
+ ;; windows 1-line tall, which means that there's no more space for
+ ;; the modeline.
+ (let ((window-min-height (min 2 height))) ;One text line plus a modeline.
(if (and window (not (eq window (selected-window))))
(save-selected-window
(select-window window)