Function: eca-chat--viewing-bottom-p

eca-chat--viewing-bottom-p is a natively compiled function defined in eca-chat.el.

Signature

(eca-chat--viewing-bottom-p WIN)

Documentation

Return non-nil when the prompt separator is displayed in WIN.

That means the user is viewing the bottom of the chat, so it is fine to auto-scroll; when the user has scrolled up to read earlier content, scrolling must be suppressed so the view does not jump.

Source Code

;; Defined in /nix/store/jklqzw6pzz6j4jrbv8wy0iwgi7jlrbld-emacs-packages-deps/share/emacs/site-lisp/elpa/eca-20260928.1827/eca-chat.el
(defun eca-chat--viewing-bottom-p (win)
  "Return non-nil when the prompt separator is displayed in WIN.
That means the user is viewing the bottom of the chat, so it is
fine to auto-scroll; when the user has scrolled up to read earlier
content, scrolling must be suppressed so the view does not jump."
  (when-let* ((prompt-start (eca-chat--prompt-area-start-point)))
    (>= (window-end win t) prompt-start)))