From: Miles Bader Date: Fri, 20 Oct 2000 16:33:54 +0000 (+0000) Subject: (set-window-text-height): Force window-min-height to 1. X-Git-Tag: emacs-pretest-21.0.90~722 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=38f99c2720818d8bc40d9ba933e42379f9d8d496;p=emacs.git (set-window-text-height): Force window-min-height to 1. --- diff --git a/lisp/window.el b/lisp/window.el index 9eb15684a85..9ce6c28f93a 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -351,18 +351,18 @@ This doesn't include the mode-line (or header-line if any) or any partial-height lines in the text display area. If WINDOW is nil, the selected window is used. -If HEIGHT is less than `window-min-height', then WINDOW is deleted. Note that the current implementation of this function cannot always set 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) - (if (and window (not (eq window (selected-window)))) - (save-selected-window - (select-window window) - (enlarge-window delta)) - (enlarge-window delta))))) + (let ((window-min-height 1)) + (if (and window (not (eq window (selected-window)))) + (save-selected-window + (select-window window) + (enlarge-window delta)) + (enlarge-window delta)))))) (defun enlarge-window-horizontally (arg)