[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/corfu-doc 2e74659620 60/95: Hide the doc frame when cur
From: |
ELPA Syncer |
Subject: |
[elpa] externals/corfu-doc 2e74659620 60/95: Hide the doc frame when current candidate is nil |
Date: |
Tue, 19 Jul 2022 15:58:05 -0400 (EDT) |
branch: externals/corfu-doc
commit 2e74659620eb26ef812f9a854d047d0d839c8111
Author: Yuwei Tian <ibluefocus@outlook.com>
Commit: Yuwei Tian <ibluefocus@outlook.com>
Hide the doc frame when current candidate is nil
---
corfu-doc.el | 47 +++++++++++++++++++++++++----------------------
1 file changed, 25 insertions(+), 22 deletions(-)
diff --git a/corfu-doc.el b/corfu-doc.el
index e4194c80ca..7cb076c904 100644
--- a/corfu-doc.el
+++ b/corfu-doc.el
@@ -434,28 +434,31 @@ FWIDTH and FHEIGHT."
(advice-remove 'corfu--popup-hide #'corfu-doc--hide))))
(defun corfu-doc--auto-show (&rest _args)
- (let ((candidate (corfu-doc--get-candidate)))
- (unless (and (string= candidate corfu-doc--candidate)
- (eq (selected-window) corfu-doc--window))
- (when (and (frame-live-p corfu-doc--frame)
- (frame-visible-p corfu-doc--frame))
- (if (and corfu-doc-mode corfu-doc-auto)
- (if (> corfu-doc-delay 0)
- (if (> corfu-doc-delay corfu-doc-hide-threshold)
- (make-frame-invisible corfu-doc--frame)
- ;; clear buffer and reset doc frame position immediately
- (corfu-doc--clear-buffer)
- (let ((cf-frame-edges (frame-edges corfu--frame 'inner)))
- (unless (equal cf-frame-edges corfu-doc--cf-frame-edges)
- (apply #'corfu-doc--set-frame-position
- corfu-doc--frame
- (corfu-doc--calculate-doc-frame-position
- (frame-pixel-width corfu-doc--frame)
- (frame-pixel-height corfu-doc--frame)))))))
- (corfu-doc--hide)))))
- (when (and corfu-doc-mode corfu-doc-auto)
- (setq corfu-doc--timer
- (run-with-timer corfu-doc-delay nil #'corfu-doc--show
corfu--index))))
+ (if-let ((candidate (corfu-doc--get-candidate)))
+ (progn
+ (unless (and (string= candidate corfu-doc--candidate)
+ (eq (selected-window) corfu-doc--window))
+ (when (and (frame-live-p corfu-doc--frame)
+ (frame-visible-p corfu-doc--frame))
+ (if (and corfu-doc-mode corfu-doc-auto)
+ (if (> corfu-doc-delay 0)
+ (if (> corfu-doc-delay corfu-doc-hide-threshold)
+ (make-frame-invisible corfu-doc--frame)
+ ;; clear buffer and reset doc frame position immediately
+ (corfu-doc--clear-buffer)
+ (let ((cf-frame-edges (frame-edges corfu--frame 'inner)))
+ (unless (equal cf-frame-edges
corfu-doc--cf-frame-edges)
+ (apply #'corfu-doc--set-frame-position
+ corfu-doc--frame
+ (corfu-doc--calculate-doc-frame-position
+ (frame-pixel-width corfu-doc--frame)
+ (frame-pixel-height corfu-doc--frame)))))))
+ (corfu-doc--hide))))
+ (when (and corfu-doc-mode corfu-doc-auto)
+ (setq corfu-doc--timer
+ (run-with-timer corfu-doc-delay nil
+ #'corfu-doc--show corfu--index))))
+ (corfu-doc--hide)))
(defun corfu-doc--cleanup ()
(advice-remove 'corfu--popup-hide #'corfu-doc--cleanup)
- [elpa] externals/corfu-doc 6c62c6634f 37/95: README: Document reducing the popup flickering, (continued)
- [elpa] externals/corfu-doc 6c62c6634f 37/95: README: Document reducing the popup flickering, ELPA Syncer, 2022/07/19
- [elpa] externals/corfu-doc 8313341ae8 52/95: Version 0.4.2, ELPA Syncer, 2022/07/19
- [elpa] externals/corfu-doc 84f344ce60 31/95: Version 0.2.0, ELPA Syncer, 2022/07/19
- [elpa] externals/corfu-doc 15dfe652f5 22/95: Automatically resize the corfu doc frame, ELPA Syncer, 2022/07/19
- [elpa] externals/corfu-doc 214b14115e 39/95: Hide doc frame if there is no documentation, ELPA Syncer, 2022/07/19
- [elpa] externals/corfu-doc 95fdae5755 46/95: Update installation, ELPA Syncer, 2022/07/19
- [elpa] externals/corfu-doc df8d7e2242 34/95: README: Document `corfu-doc-hide-threshold`, ELPA Syncer, 2022/07/19
- [elpa] externals/corfu-doc 2a3f515022 63/95: Add corfu-doc--popup-scroll function, ELPA Syncer, 2022/07/19
- [elpa] externals/corfu-doc b3394359de 54/95: Fix #9 (again): fix error when candidate index is nil, ELPA Syncer, 2022/07/19
- [elpa] externals/corfu-doc 6c0653336d 36/95: Avoid doc frame repositioning delay, ELPA Syncer, 2022/07/19
- [elpa] externals/corfu-doc 2e74659620 60/95: Hide the doc frame when current candidate is nil,
ELPA Syncer <=
- [elpa] externals/corfu-doc 807448a3de 38/95: Version 0.3.0, ELPA Syncer, 2022/07/19
- [elpa] externals/corfu-doc 5a6f4f879d 59/95: Version 0.5.0, ELPA Syncer, 2022/07/19
- [elpa] externals/corfu-doc 91e66b0804 25/95: Avoid warning if x-gtk-resize-child-frames is missing, ELPA Syncer, 2022/07/19
- [elpa] externals/corfu-doc 904df4f99a 62/95: Make corfu-doc-mode a global minor mode, ELPA Syncer, 2022/07/19
- [elpa] externals/corfu-doc 9750d1af61 65/95: Fix calling corfu-doc--refresh-popup, ELPA Syncer, 2022/07/19
- [elpa] externals/corfu-doc 9d81c522f6 56/95: Simplify code, ELPA Syncer, 2022/07/19
- [elpa] externals/corfu-doc f63395100e 69/95: Fix typo (#14), ELPA Syncer, 2022/07/19
- [elpa] externals/corfu-doc 96b5de8cce 61/95: Version 0.5.1, ELPA Syncer, 2022/07/19
- [elpa] externals/corfu-doc 611895ef47 66/95: Version 0.6.0, ELPA Syncer, 2022/07/19
- [elpa] externals/corfu-doc 7b10759a2e 73/95: Fix warnings, ELPA Syncer, 2022/07/19