branch: externals/ivy-posframe commit 112655b9919792790f7548ed0e7c167d0f72dec9 Author: Feng Shu <tuma...@163.com> Commit: Feng Shu <tuma...@163.com>
Add a window/frame top center position option #61 --- ivy-posframe.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ivy-posframe.el b/ivy-posframe.el index 7e8236c..7d99b41 100644 --- a/ivy-posframe.el +++ b/ivy-posframe.el @@ -61,6 +61,7 @@ ;; ;; (setq ivy-posframe-display-functions-alist '((t . ivy-posframe-display-at-window-center))) ;; ;; (setq ivy-posframe-display-functions-alist '((t . ivy-posframe-display-at-frame-bottom-left))) ;; ;; (setq ivy-posframe-display-functions-alist '((t . ivy-posframe-display-at-window-bottom-left))) +;; ;; (setq ivy-posframe-display-functions-alist '((t . ivy-posframe-display-at-frame-top-center))) ;; (ivy-posframe-mode 1) ;; #+END_EXAMPLE ;; *** Per-command mode. @@ -308,6 +309,9 @@ This variable is useful for `ivy-posframe-read-action' .") (defun ivy-posframe-display-at-point (str) (ivy-posframe--display str #'posframe-poshandler-point-bottom-left-corner)) +(defun ivy-posframe-display-at-frame-top-center (str) + (ivy-posframe--display str #'posframe-poshandler-frame-top-center)) + (defun ivy-posframe-cleanup () "Cleanup ivy's posframe." (when (posframe-workable-p)