Function: vertico-posframe--show

vertico-posframe--show is a natively compiled function defined in vertico-posframe.el.

Signature

(vertico-posframe--show BUFFER WINDOW-POINT)

Documentation

posframe-show of vertico-posframe.

Source Code

;; Defined in /nix/store/ikn3v8q50cnzqr2w28cx8b7wqr6cg5zb-emacs-packages-deps/share/emacs/site-lisp/elpa/vertico-posframe-0.9.2/vertico-posframe.el
(defun vertico-posframe--show (buffer window-point)
  "`posframe-show' of vertico-posframe."
  (with-selected-window (vertico-posframe-last-window) ;Some posframe poshandlers need infos of last-window.
    (with-current-buffer buffer
      (unless (local-variable-p 'auto-hscroll-mode)
        (setq-local auto-hscroll-mode 'current-line)
        (setq-local vertico-posframe--use-auto-hscroll-mode-p t)))
    (apply #'posframe-show
           buffer
           :cursor (if (eq cursor-type t)
                       ;; For vertico-posframe special, when
                       ;; cursor-type is t, hollow box will be showed,
                       ;; which is not expected by user, so we should
                       ;; force show it with box.
                       'box
                     cursor-type)
           :tty-non-selected-cursor t
           :window-point window-point
           :font (buffer-local-value 'vertico-posframe-font buffer)
           ;; Variable settings in `vertico-multiform-commands' will
           ;; save to BUFFER as buffer-local variables, so we need to
           ;; get buffer local value from BUFFER, for example:
           ;;
           ;; (setq vertico-multiform-commands
           ;;       '((consult-line
           ;;          posframe
           ;;          (vertico-posframe-poshandler . posframe-poshandler-frame-top-center))
           ;;         (t buffer)))
           ;;
           :poshandler (buffer-local-value 'vertico-posframe-poshandler buffer)
           :background-color (face-attribute 'vertico-posframe :background nil t)
           :foreground-color (face-attribute 'vertico-posframe :foreground nil t)
           :border-width (buffer-local-value 'vertico-posframe-border-width buffer)
           :border-color (vertico-posframe--get-border-color)
           :override-parameters (buffer-local-value 'vertico-posframe-parameters buffer)
           :refposhandler (buffer-local-value 'vertico-posframe-refposhandler buffer)
           :hidehandler #'vertico-posframe-hidehandler
           :lines-truncate (buffer-local-value 'vertico-posframe-truncate-lines buffer)
           (funcall (buffer-local-value 'vertico-posframe-size-function buffer) buffer))))