Function: hycontrol-window-minimize-lines
hycontrol-window-minimize-lines is an interactive and byte-compiled
function defined in hycontrol.el.
Signature
(hycontrol-window-minimize-lines)
Documentation
Shrink window to its smallest number of lines to show whole buffer, if possible.
Otherwise or if the window is already displaying all of its lines, shrink it to about one line, if possible.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hycontrol.el
(defun hycontrol-window-minimize-lines ()
"Shrink window to its smallest number of lines to show whole buffer, if possible.
Otherwise or if the window is already displaying all of its
lines, shrink it to about one line, if possible."
(interactive)
(let ((neg-shrink-amount (- (1+ (count-lines (point-min) (point-max)))))
(window-min-height 1))
;; Don't use minimize-window here since it shrinks regardless of
;; buffer size.
(if (window-resizable-p (selected-window) neg-shrink-amount)
(progn (goto-char (point-min))
(shrink-window (+ (window-height) neg-shrink-amount)))
(shrink-window (1- (window-height))))))