summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mendler <mail@daniel-mendler.de>2022-09-21 22:51:48 +0200
committerDaniel Mendler <mail@daniel-mendler.de>2022-09-21 22:51:48 +0200
commit309f05ddb4b2f3802a4f88ef157fbe1933612a22 (patch)
treebe64cd55863075ed627d3d94aa2a0714779b3200
parentba75b691fad02e99a2b087a68f81b64f5ca3f7e1 (diff)
Experimentationpreview-first
-rw-r--r--corfu.el8
1 files 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)