aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiles Bader2000-10-20 16:33:54 +0000
committerMiles Bader2000-10-20 16:33:54 +0000
commit38f99c2720818d8bc40d9ba933e42379f9d8d496 (patch)
tree40006fde0399008cbab5584aeadf9ae57f35d657
parent8094989ba2229aeb562284ac96034252ad0c90c8 (diff)
downloademacs-38f99c2720818d8bc40d9ba933e42379f9d8d496.tar.gz
emacs-38f99c2720818d8bc40d9ba933e42379f9d8d496.zip
(set-window-text-height): Force window-min-height to 1.
-rw-r--r--lisp/window.el12
1 files changed, 6 insertions, 6 deletions
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
351partial-height lines in the text display area. 351partial-height lines in the text display area.
352 352
353If WINDOW is nil, the selected window is used. 353If WINDOW is nil, the selected window is used.
354If HEIGHT is less than `window-min-height', then WINDOW is deleted.
355 354
356Note that the current implementation of this function cannot always set 355Note that the current implementation of this function cannot always set
357the height exactly, but attempts to be conservative, by allocating more 356the height exactly, but attempts to be conservative, by allocating more
358lines than are actually needed in the case where some error may be present." 357lines than are actually needed in the case where some error may be present."
359 (let ((delta (- height (window-text-height window)))) 358 (let ((delta (- height (window-text-height window))))
360 (unless (zerop delta) 359 (unless (zerop delta)
361 (if (and window (not (eq window (selected-window)))) 360 (let ((window-min-height 1))
362 (save-selected-window 361 (if (and window (not (eq window (selected-window))))
363 (select-window window) 362 (save-selected-window
364 (enlarge-window delta)) 363 (select-window window)
365 (enlarge-window delta))))) 364 (enlarge-window delta))
365 (enlarge-window delta))))))
366 366
367 367
368(defun enlarge-window-horizontally (arg) 368(defun enlarge-window-horizontally (arg)