branch: externals/ivy-posframe
commit 5804bfa329892d028e1b2e650d6d5f3bb3baea37
Author: Feng Shu <[email protected]>
Commit: Feng Shu <[email protected]>

    Hide ivy-posframe when exit minibuffer.
    
    * ivy-posframe.el (ivy-posframe--display): Add :hidehandler.
    (ivy-posframe-hidehandler): New function.
---
 ivy-posframe.el | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index 723141f..9fdceca 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -284,11 +284,16 @@ This variable is useful for `ivy-posframe-read-action' .")
              :internal-border-color (face-attribute 'ivy-posframe-border 
:background nil t)
              :override-parameters ivy-posframe-parameters
              :refposhandler ivy-posframe-refposhandler
+             :hidehandler #'ivy-posframe-hidehandler
              (funcall ivy-posframe-size-function))
       (ivy-posframe--add-prompt 'ignore)))
   (with-current-buffer ivy-posframe-buffer
     (setq-local truncate-lines ivy-truncate-lines)))
 
+(defun ivy-posframe-hidehandler (_)
+  "Hidehandler used by ivy-posframe."
+  (not (minibufferp)))
+
 (defun ivy-posframe-get-size ()
   "The default functon used by `ivy-posframe-size-function'."
   (list

Reply via email to