Function: eca-chat--setup-item-stickiness

eca-chat--setup-item-stickiness is a natively compiled function defined in eca-chat-context.el.

Signature

(eca-chat--setup-item-stickiness)

Documentation

Keep the text typed right after a prompt item out of it.

Otherwise the typed text inherits the item properties: it looks glued to the item, gets deleted along with it and is replaced by the item when the prompt is sent.

Source Code

;; Defined in /nix/store/jklqzw6pzz6j4jrbv8wy0iwgi7jlrbld-emacs-packages-deps/share/emacs/site-lisp/elpa/eca-20260928.1827/eca-chat-context.el
(defun eca-chat--setup-item-stickiness ()
  "Keep the text typed right after a prompt item out of it.
Otherwise the typed text inherits the item properties: it looks
glued to the item, gets deleted along with it and is replaced by
the item when the prompt is sent."
  (setq-local text-property-default-nonsticky
              (append (mapcar (lambda (prop) (cons prop t))
                              eca-chat--item-properties)
                      text-property-default-nonsticky))
  (add-hook 'post-self-insert-hook #'eca-chat--drop-inherited-item-face nil t))