Function: eca-chat-inline--refresh

eca-chat-inline--refresh is a natively compiled function defined in eca-chat-inline.el.

Signature

(eca-chat-inline--refresh OV)

Documentation

Refresh the before-string display of OV.

The header and the answer viewport are rendered above the anchor. While overlays are hidden, the display, anchor face and keymap are dropped so the buffer behaves as if the overlay was not there; the state keeps updating in the background.

Source Code

;; Defined in /nix/store/jklqzw6pzz6j4jrbv8wy0iwgi7jlrbld-emacs-packages-deps/share/emacs/site-lisp/elpa/eca-20260928.1827/eca-chat-inline.el
(defun eca-chat-inline--refresh (ov)
  "Refresh the before-string display of OV.
The header and the answer viewport are rendered above the anchor.
While overlays are hidden, the display, anchor face and keymap
are dropped so the buffer behaves as if the overlay was not
there; the state keeps updating in the background."
  (when-let* ((buf (overlay-buffer ov)))
    (if eca-chat-inline--overlays-hidden
        (progn
          (overlay-put ov 'before-string nil)
          (overlay-put ov 'face nil)
          (overlay-put ov 'keymap nil))
      (overlay-put ov 'face 'eca-chat-inline-anchor-face)
      (overlay-put ov 'keymap eca-chat-inline-actions-map)
      (eca-chat-inline--render ov buf))))