anchor.diff:              :type ring:ring
               :documentation "History of inputs for the minibuffer.
   If nil, no history is used.")
  +   (multi-selection-p :initarg :multi-selection-p :accessor multi-selection-p
  +                      :initform nil
  +                      :type boolean
  +                      :documentation "If non-nil, allow for selecting multiple
  +candidates.")
      (completions :accessor completions :initform nil)
  +   (marked-completions :accessor marked-completions :initform nil)
      (completion-head :accessor completion-head :initform 0)
      (completion-cursor :accessor completion-cursor :initform 0) ; TODO: Rename to completion-index?
      (content :initform ""
  
positive.code: 
  (define-command return-input (&optional (minibuffer (current-minibuffer)))
    "Return with minibuffer selection."
    (with-slots (callback empty-complete-immediate completions completion-cursor)
        minibuffer
      (match (and completions
                  (nth completion-cursor completions))
        ((guard completion completion)
         ;; Note that "immediate input" is also in completions, so it's caught here.
         (setf completion (if (stringp completion)
                              (str:replace-all " " " " completion)
                              completion))
         (funcall callback completion))))
    (quit-minibuffer minibuffer))
  
  (define-command return-immediate (&optional (minibuffer (current-minibuffer)))
  
negative.code:          (object-string (nth completion-cursor completions)))))
  
  (define-command copy-candidate (&optional (minibuffer (current-minibuffer)))
    "Copy candidate to clipboard."
    (let ((candidate (get-candidate minibuffer)))
      (when candidate
        (trivial-clipboard:text candidate))))
  