Function: ghostel--top-pad-leftover

ghostel--top-pad-leftover is a natively compiled function defined in ghostel.el.

Signature

(ghostel--top-pad-leftover WINDOW TARGET ANCHOR)

Documentation

Return the pixels WINDOW leaves free below TARGET, 0 unless it shows row 1.

ANCHOR is WINDOW's ghostel--pixel-anchor for TARGET, measured when nil. Call only with the pad cleared - see ghostel--balance-top-pad.

Source Code

;; Defined in /nix/store/1252krff0gb2kisjcpp45m50cpdskfrl-emacs-packages-deps/share/emacs/site-lisp/ghostel.el
(defun ghostel--top-pad-leftover (window target anchor)
  "Return the pixels WINDOW leaves free below TARGET, 0 unless it shows row 1.
ANCHOR is WINDOW's `ghostel--pixel-anchor' for TARGET, measured when
nil.  Call only with the pad cleared - see `ghostel--balance-top-pad'."
  (pcase (or anchor (ghostel--pixel-anchor window target))
    (`(,start ,_ ,height)
     (if (= start (point-min))
         (max 0 (- (window-body-height window t) height))
       0))
    (_ 0)))