summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFeng Shu <tumashu@163.com>2021-06-09 08:58:12 +0800
committerFeng Shu <tumashu@163.com>2021-06-09 09:01:36 +0800
commit5804bfa329892d028e1b2e650d6d5f3bb3baea37 (patch)
tree3b288e48382ae3a2ae9ff73e4bc0a1e8842459c1
parent084cc59ea2cd62afaa51445ada3d00404749a541 (diff)
Hide ivy-posframe when exit minibuffer.
* ivy-posframe.el (ivy-posframe--display): Add :hidehandler. (ivy-posframe-hidehandler): New function.
-rw-r--r--ivy-posframe.el5
1 files changed, 5 insertions, 0 deletions
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