Function: cider-repl-history-preview-overlay-setup

cider-repl-history-preview-overlay-setup is a byte-compiled function defined in cider-repl-history.el.

Signature

(cider-repl-history-preview-overlay-setup ORIG-BUF)

Documentation

Setup the preview overlay in ORIG-BUF.

Source Code

;; Defined in ~/.emacs.d/elpa/cider-20260414.1619/cider-repl-history.el
(defun cider-repl-history-preview-overlay-setup (orig-buf)
  "Setup the preview overlay in ORIG-BUF."
  (when cider-repl-history-show-preview
    (with-current-buffer orig-buf
      (let* ((will-replace (region-active-p))
             (start (if will-replace
                        (min (point) (mark))
                      (point)))
             (end (if will-replace
                      (max (point) (mark))
                    (point))))
        (cider-repl-history-clear-preview)
        (setq cider-repl-history-preview-overlay
              (make-overlay start end orig-buf))
        (overlay-put cider-repl-history-preview-overlay
                     'invisible t)))))