Mercurial > emacs
comparison lisp/window.el @ 32695:5a4f1fbd4ed7
(set-window-text-height): Force window-min-height to 1.
author | Miles Bader <miles@gnu.org> |
---|---|
date | Fri, 20 Oct 2000 16:33:54 +0000 |
parents | 9f29610841ca |
children | 7d93bad80655 |
comparison
equal
deleted
inserted
replaced
32694:8c9daad87816 | 32695:5a4f1fbd4ed7 |
---|---|
349 "Sets the height in lines of the text display area of WINDOW to HEIGHT. | 349 "Sets the height in lines of the text display area of WINDOW to HEIGHT. |
350 This doesn't include the mode-line (or header-line if any) or any | 350 This doesn't include the mode-line (or header-line if any) or any |
351 partial-height lines in the text display area. | 351 partial-height lines in the text display area. |
352 | 352 |
353 If WINDOW is nil, the selected window is used. | 353 If WINDOW is nil, the selected window is used. |
354 If HEIGHT is less than `window-min-height', then WINDOW is deleted. | |
355 | 354 |
356 Note that the current implementation of this function cannot always set | 355 Note that the current implementation of this function cannot always set |
357 the height exactly, but attempts to be conservative, by allocating more | 356 the height exactly, but attempts to be conservative, by allocating more |
358 lines than are actually needed in the case where some error may be present." | 357 lines 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) |
369 "Make current window ARG columns wider." | 369 "Make current window ARG columns wider." |
370 (interactive "p") | 370 (interactive "p") |