From 309f05ddb4b2f3802a4f88ef157fbe1933612a22 Mon Sep 17 00:00:00 2001 From: Daniel Mendler Date: Wed, 21 Sep 2022 22:51:48 +0200 Subject: Experimentation --- corfu.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/corfu.el b/corfu.el index 999bb44..3270f27 100644 --- a/corfu.el +++ b/corfu.el @@ -894,7 +894,8 @@ there hasn't been any input, then quit." (corfu--done str 'finished))) ;; 3) There exist candidates => Show candidates popup. (corfu--candidates - (corfu--preview-current beg end) + (when (or (not (cdr corfu--candidates)) (/= corfu--index corfu--preselect)) + (corfu--preview-current beg end)) (corfu--echo-documentation) ;; TODO unobtrusive mode ;; (when (or (not corfu-preview-current) @@ -902,7 +903,10 @@ there hasn't been any input, then quit." ;; (< corfu--index 0) ;; (/= corfu--index corfu--preselect)) ;; (corfu--candidates-popup beg)) - (corfu--candidates-popup beg) + (if (cdr corfu--candidates) + (corfu--candidates-popup beg) + (corfu--popup-hide)) + ) ;; 4) There are no candidates & corfu-quit-no-match => Confirmation popup. ((and (not corfu--candidates) -- cgit v1.0