emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/ivy-posframe 233a3ec 070/195: Fix Strange behaviour #25


From: Feng Shu
Subject: [elpa] externals/ivy-posframe 233a3ec 070/195: Fix Strange behaviour #25
Date: Sat, 3 Oct 2020 07:11:47 -0400 (EDT)

branch: externals/ivy-posframe
commit 233a3ec36551102b33e0271ee7f8bd841fdc2bb4
Author: Feng Shu <tumashu@163.com>
Commit: Feng Shu <tumashu@163.com>

    Fix Strange behaviour #25
---
 ivy-posframe.el | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/ivy-posframe.el b/ivy-posframe.el
index 4b35100..6fd303e 100644
--- a/ivy-posframe.el
+++ b/ivy-posframe.el
@@ -191,6 +191,9 @@ When 0, no border is showed."
   "When non-nil, ivy-posframe will ignore prompt.
 This variable is useful for `ivy-posframe-read-action' .")
 
+(defvar ivy-posframe--display-p nil
+  "The status of `ivy-posframe--display'")
+
 ;; Fix warn
 (defvar emacs-basic-display)
 
@@ -198,6 +201,7 @@ This variable is useful for `ivy-posframe-read-action' .")
   "Show STR in ivy's posframe."
   (if (not (ivy-posframe-workable-p))
       (ivy-display-function-fallback str)
+    (setq ivy-posframe--display-p t)
     (with-selected-window (ivy--get-window ivy-last)
       (posframe-show
        ivy-posframe-buffer
@@ -252,7 +256,8 @@ This variable is useful for `ivy-posframe-read-action' .")
 (defun ivy-posframe-cleanup ()
   "Cleanup ivy's posframe."
   (when (ivy-posframe-workable-p)
-    (posframe-hide ivy-posframe-buffer)))
+    (posframe-hide ivy-posframe-buffer)
+    (setq ivy-posframe--display-p nil)))
 
 (defun ivy-posframe-workable-p ()
   "Test ivy-posframe workable status."
@@ -450,7 +455,9 @@ selection, non-nil otherwise."
 (defun ivy-posframe--minibuffer-setup (orig-func)
   "Advice function of `ivy--minibuffer-setup'."
   (funcall orig-func)
-  (when ivy-posframe-hide-minibuffer
+  (when (and ivy-posframe-hide-minibuffer
+             ;; only hide minibuffer's info when posframe is showed.
+             ivy-posframe--display-p)
     (let ((ov (make-overlay (point-min) (point-max) nil nil t)))
       (overlay-put ov 'window (selected-window))
       (overlay-put ov 'face



reply via email to

[Prev in Thread] Current Thread [Next in Thread]