Function: which-key--side-window-max-dimensions

which-key--side-window-max-dimensions is a byte-compiled function defined in which-key.el.gz.

Signature

(which-key--side-window-max-dimensions)

Documentation

Return max-dimensions of the side-window popup.

The return value should be (height . width) in lines and characters respectively.

Source Code

;; Defined in /usr/src/emacs/lisp/which-key.el.gz
(defun which-key--side-window-max-dimensions ()
  "Return max-dimensions of the side-window popup.
The return value should be (height . width) in lines and
characters respectively."
  (cons
   ;; height
   (if (member which-key-side-window-location '(left right))
       ;; 1 is a kludge to make sure there is no overlap
       (- (frame-height) (window-text-height (minibuffer-window)) 1)
     ;; (window-mode-line-height which-key--window))
     ;; FIXME: change to something like
     ;; (min which-*-height (calculate-max-height))
     (which-key--height-or-percentage-to-height
      which-key-side-window-max-height))
   ;; width
   (max 0
        (- (if (memq which-key-side-window-location '(left right))
               (which-key--total-width-to-text
                (which-key--width-or-percentage-to-width
                 which-key-side-window-max-width))
             (which-key--total-width-to-text
              (which-key--width-or-percentage-to-width
               1.0)))
           which-key-unicode-correction))))