branch: externals/corfu-doc
commit b3394359debe4fa2e0ad1aa32cad11485f3ca401
Author: Yuwei Tian <[email protected]>
Commit: Yuwei Tian <[email protected]>
Fix #9 (again): fix error when candidate index is nil
---
corfu-doc.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/corfu-doc.el b/corfu-doc.el
index 3dfbc004fb..028db22adb 100644
--- a/corfu-doc.el
+++ b/corfu-doc.el
@@ -343,7 +343,8 @@ FWIDTH and FHEIGHT."
(defun corfu-doc--show (&optional candidate-index)
(when (and (and (fboundp 'corfu-mode) corfu-mode)
(frame-visible-p corfu--frame)
- (equal candidate-index corfu--index))
+ (or (null candidate-index)
+ (equal candidate-index corfu--index)))
(when-let ((candidate (corfu-doc--get-candidate))
(cf-frame-edges (frame-edges corfu--frame 'inner)))
(if (and (string= candidate corfu-doc--candidate)