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

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

[elpa] externals/vertico-posframe d2f4440739 1/3: vertico-posframe--show


From: ELPA Syncer
Subject: [elpa] externals/vertico-posframe d2f4440739 1/3: vertico-posframe--show-init: only run once.
Date: Fri, 31 Dec 2021 04:58:29 -0500 (EST)

branch: externals/vertico-posframe
commit d2f44407393b2a217dcf9935556ef201ff04fec5
Author: Feng Shu <tumashu@163.com>
Commit: Feng Shu <tumashu@163.com>

    vertico-posframe--show-init: only run once.
    
    * vertico-posframe.el (vertico-posframe--show-init): Run only when 
vertico-posframe--buffer is not live.
---
 vertico-posframe.el | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/vertico-posframe.el b/vertico-posframe.el
index 7abf33e6d9..4cf5813a87 100644
--- a/vertico-posframe.el
+++ b/vertico-posframe.el
@@ -232,16 +232,17 @@ Show STRING when it is a string."
 
 (defun vertico-posframe--show-init ()
   "Create posframe in advance to limit flicker for `vertico-posframe--show'."
-  (posframe-show vertico-posframe--buffer
-                 :string ""
-                 :font vertico-posframe-font
-                 :position (cons 0 0)
-                 :background-color (face-attribute 'vertico-posframe 
:background nil t)
-                 :foreground-color (face-attribute 'vertico-posframe 
:foreground nil t)
-                 :border-width vertico-posframe-border-width
-                 :border-color (face-attribute 'vertico-posframe-border 
:background nil t)
-                 :override-parameters vertico-posframe-parameters
-                 :timeout 0.1))
+  (unless (buffer-live-p (get-buffer vertico-posframe--buffer))
+    (posframe-show vertico-posframe--buffer
+                   :string ""
+                   :font vertico-posframe-font
+                   :position (cons 0 0)
+                   :background-color (face-attribute 'vertico-posframe 
:background nil t)
+                   :foreground-color (face-attribute 'vertico-posframe 
:foreground nil t)
+                   :border-width vertico-posframe-border-width
+                   :border-color (face-attribute 'vertico-posframe-border 
:background nil t)
+                   :override-parameters vertico-posframe-parameters
+                   :timeout 0.1)))
 
 (defun vertico-posframe--create-minibuffer-cover (&optional string)
   "Create minibuffer cover."



reply via email to

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