Function: ghostel--window-follows-p

ghostel--window-follows-p is a natively compiled function defined in ghostel.el.

Signature

(ghostel--window-follows-p WINDOW)

Documentation

Non-nil if WINDOW's point lets it follow live terminal output.

WINDOW's buffer must be current. Emacs mode follows on the live cursor, a line-mode window selected in its frame on the live edge (other windows' point carries no user intent); all other modes follow unless a region is active.

Source Code

;; Defined in /nix/store/1252krff0gb2kisjcpp45m50cpdskfrl-emacs-packages-deps/share/emacs/site-lisp/ghostel.el
(defun ghostel--window-follows-p (window)
  "Non-nil if WINDOW's point lets it follow live terminal output.
WINDOW's buffer must be current.  Emacs mode follows on the live cursor,
a line-mode window selected in its frame on the live edge (other windows' point
carries no user intent); all other modes follow unless a region is active."
  (pcase ghostel--input-mode
    ('emacs (ghostel--window-on-cursor-p window))
    ('line (or (not (eq window (frame-selected-window
                                (window-frame window))))
               (ghostel--line-mode-on-live-edge-p window)))
    (_ (not (region-active-p)))))