From 5937a3fdbdd3e19e1772290d718b4acaf9704e68 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sun, 2 Jul 2006 14:32:52 +0000 Subject: [PATCH] (set-window-text-height): Only set window-min-height to 1 if that's the requested size. --- lisp/window.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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) -- 2.39.2