Function: window--resize-mini-window
window--resize-mini-window is a byte-compiled function defined in
window.el.gz.
Signature
(window--resize-mini-window WINDOW DELTA)
Documentation
Change height of mini window WINDOW by DELTA pixels.
If WINDOW cannot be resized by DELTA pixels make it as large (or as small) as possible, but don't signal an error.
Source Code
;; Defined in /usr/src/emacs/lisp/window.el.gz
;; The following is the internal function used when resizing mini
;; windows "manually", for example, when dragging a divider between
;; root and mini window. The routines for automatic minibuffer window
;; resizing call `window--resize-root-window-vertically' instead.
(defun window--resize-mini-window (window delta)
"Change height of mini window WINDOW by DELTA pixels.
If WINDOW cannot be resized by DELTA pixels make it as large (or
as small) as possible, but don't signal an error."
(when (window-minibuffer-p window)
(let* ((frame (window-frame window))
(root (frame-root-window frame))
(height (window-pixel-height window))
(min-height (+ (frame-char-height frame)
(- (window-pixel-height window)
(window-body-height window t))))
(max-delta (- (window-pixel-height root)
(window-min-size root nil nil t))))
;; Don't make mini window too small.
(when (< (+ height delta) min-height)
(setq delta (- min-height height)))
;; Don't make root window too small.
(when (> delta max-delta)
(setq delta max-delta))
(unless (zerop delta)
(window--resize-reset frame)
(window--resize-this-window root (- delta) nil nil t)
(set-window-new-pixel window (+ height delta))
;; The following routine catches the case where we want to resize
;; a minibuffer-only frame.
(when (resize-mini-window-internal window)
(window--pixel-to-total frame))))))