Function: eca-chat--go-to-overlay

eca-chat--go-to-overlay is a natively compiled function defined in eca-chat.el.

Signature

(eca-chat--go-to-overlay OV-KEY RANGE-MIN RANGE-MAX FIRST?)

Documentation

Navigate to overlay matching OV-KEY in RANGE-MIN..RANGE-MAX.

When FIRST? is non-nil pick the first match, otherwise the last. Operates on the current buffer directly — callers pass range values from their own buffer, so switching to eca-chat--get-last-buffer would apply them to the wrong buffer when multiple sessions exist.

Source Code

;; Defined in /nix/store/jklqzw6pzz6j4jrbv8wy0iwgi7jlrbld-emacs-packages-deps/share/emacs/site-lisp/elpa/eca-20260928.1827/eca-chat.el
(defun eca-chat--go-to-overlay (ov-key range-min range-max first?)
  "Navigate to overlay matching OV-KEY in RANGE-MIN..RANGE-MAX.
When FIRST? is non-nil pick the first match, otherwise the last.
Operates on the current buffer directly — callers pass range
values from their own buffer, so switching to
`eca-chat--get-last-buffer' would apply them to the wrong
buffer when multiple sessions exist."
  (let ((get-fn (if first? #'-first #'-last)))
    (when-let ((ov (funcall get-fn (-lambda (ov) (overlay-get ov ov-key))
                            (overlays-in range-min range-max))))
      (goto-char (overlay-start ov)))))