Function: eshell-smart-scroll
eshell-smart-scroll is a byte-compiled function defined in
em-smart.el.gz.
Signature
(eshell-smart-scroll)
Documentation
Scroll WINDOW to display as much output as possible, smartly.
Source Code
;; Defined in /usr/src/emacs/lisp/eshell/em-smart.el.gz
(defun eshell-smart-scroll ()
"Scroll WINDOW to display as much output as possible, smartly."
(let ((top-point (point)))
(and (memq 'eshell-smart-display-move pre-command-hook)
(>= (point) eshell-last-input-start)
(< (point) eshell-last-input-end)
(set-window-start (selected-window)
(pos-bol) t))
(when (pos-visible-in-window-p (point-max) (selected-window))
(save-excursion
(goto-char (point-max))
(recenter -1)
(unless (pos-visible-in-window-p top-point (selected-window))
(goto-char top-point)
(set-window-start (selected-window)
(pos-bol) t))))))