Function: ghostel--buffer-focused-p

ghostel--buffer-focused-p is a natively compiled function defined in ghostel.el.

Signature

(ghostel--buffer-focused-p BUF)

Documentation

Return non-nil if BUF is logically focused.

BUF is focused when it is displayed in the selected window of a frame whose focus state is t (i.e. the frame has keyboard focus and the buffer is the active selection within it).

Source Code

;; Defined in /nix/store/1252krff0gb2kisjcpp45m50cpdskfrl-emacs-packages-deps/share/emacs/site-lisp/ghostel.el
(defun ghostel--buffer-focused-p (buf)
  "Return non-nil if BUF is logically focused.
BUF is focused when it is displayed in the selected window of a
frame whose focus state is t (i.e. the frame has keyboard focus
and the buffer is the active selection within it)."
  (seq-some (lambda (win)
              (let ((frame (window-frame win)))
                (and (eq (frame-focus-state frame) t)
                     (eq win (frame-selected-window frame)))))
            (get-buffer-window-list buf nil t)))