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

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

[elpa] externals/corfu-doc 7c546a3eae 16/95: Hide popup frame when candi


From: ELPA Syncer
Subject: [elpa] externals/corfu-doc 7c546a3eae 16/95: Hide popup frame when candidate documentation is empty
Date: Tue, 19 Jul 2022 15:58:01 -0400 (EDT)

branch: externals/corfu-doc
commit 7c546a3eae8c7acb63a46c37b69848a80dbeeaf1
Author: Yuwei Tian <ibluefocus@outlook.com>
Commit: Yuwei Tian <ibluefocus@outlook.com>

    Hide popup frame when candidate documentation is empty
---
 corfu-doc.el | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/corfu-doc.el b/corfu-doc.el
index da5149c3d8..a142887a91 100644
--- a/corfu-doc.el
+++ b/corfu-doc.el
@@ -257,9 +257,11 @@
                        (equal cf-frame-edges corfu-doc--cf-frame-edges)
                        (eq (selected-window) corfu-doc--window))
             ;; show doc frame
-            (when-let* ((doc (ignore-errors (corfu-doc-fetch-documentation))))
-              (eval `(corfu-doc--make-frame
-                      ,@(corfu-doc--calculate-doc-frame-position) ,doc)))))
+            (if-let* ((res (ignore-errors (corfu-doc-fetch-documentation)))
+                      (doc (unless (string-empty-p (string-trim res)) res)))
+                (eval `(corfu-doc--make-frame
+                        ,@(corfu-doc--calculate-doc-frame-position) ,doc))
+              (corfu-doc--hide))))
       (corfu-doc--hide))
     (setq corfu-doc--candidate candidate)
     (setq corfu-doc--cf-frame-edges cf-frame-edges)



reply via email to

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