Function: edt-bottom-check
edt-bottom-check is a byte-compiled function defined in edt.el.gz.
Signature
(edt-bottom-check BEG LINES)
Documentation
Enforce scroll margin at the bottom of screen.
Argument BEG is the starting line number before cursor was moved. Argument LINES is the number of lines the cursor moved toward the bottom.
Source Code
;; Defined in /usr/src/emacs/lisp/emulation/edt.el.gz
(defun edt-bottom-check (beg lines)
"Enforce scroll margin at the bottom of screen.
Argument BEG is the starting line number before cursor was moved.
Argument LINES is the number of lines the cursor moved toward the bottom."
(let* ((height (window-height))
(margin (+ 1 (/ (* height edt-bottom-scroll-margin) 100)))
;; subtract 1 from height because it includes mode line
(difference (- height margin 1)))
(cond ((> beg difference) (recenter beg))
((> (+ beg lines) difference) (recenter (- margin))))))