Function: icomplete--ensure-visible-lines-inside-buffer
icomplete--ensure-visible-lines-inside-buffer is a byte-compiled
function defined in icomplete.el.gz.
Signature
(icomplete--ensure-visible-lines-inside-buffer)
Documentation
Ensure the completion list is visible in regular buffers only.
Scrolls the screen to be at least icomplete-prospects-height real lines
away from the bottom. Counts wrapped lines as real lines.
Source Code
;; Defined in /usr/src/emacs/lisp/icomplete.el.gz
(defun icomplete--ensure-visible-lines-inside-buffer ()
"Ensure the completion list is visible in regular buffers only.
Scrolls the screen to be at least `icomplete-prospects-height' real lines
away from the bottom. Counts wrapped lines as real lines."
(unless (minibufferp)
(let* ((window-height (window-body-height))
(current-line (count-screen-lines (window-start) (point)))
(lines-to-bottom (- window-height current-line)))
(when (< lines-to-bottom icomplete-prospects-height)
(scroll-up (- icomplete-prospects-height lines-to-bottom))))))