[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/corfu 9dc4759 09/11: Exit conditions: Minor cleanup
From: |
Protesilaos Stavrou |
Subject: |
[elpa] externals/corfu 9dc4759 09/11: Exit conditions: Minor cleanup |
Date: |
Tue, 27 Apr 2021 11:39:07 -0400 (EDT) |
branch: externals/corfu
commit 9dc4759a9af430c27621bcbefd3dad0d5d5f184a
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Exit conditions: Minor cleanup
---
corfu.el | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/corfu.el b/corfu.el
index 464cae1..5a2bd32 100644
--- a/corfu.el
+++ b/corfu.el
@@ -429,14 +429,15 @@ If `line-spacing/=nil' or in text-mode, the background
color is used instead.")
(unless (equal corfu--input (cons str pt))
(corfu--update-candidates str metadata pt table pred))
(cond
- ((and (not corfu--candidates) corfu-confirm)
+ ((and (not corfu--candidates) ;; 1. There are no candidates
+ corfu-confirm) ;; 2. Confirmation is enabled
(corfu--popup beg (list corfu-confirm)))
- ((and
- corfu--candidates ;; 1. There exist candidates
- (not (equal corfu--candidates (list str))) ;; 2. Not a single exactly
matching candidate
- (or (/= beg end) ;; 3. Input is non-empty
- (eq this-command 'completion-at-point)
- (string-match-p corfu--keep-alive (prin1-to-string this-command))))
+ ((and corfu--candidates ;; 1. There exist
candidates
+ (not (equal corfu--candidates (list str))) ;; 2. Not a sole exactly
matching candidate
+ (or (/= beg end) ;; 3. Input is non-empty
+ (eq this-command 'completion-at-point)
+ (and (symbolp this-command)
+ (string-match-p corfu--keep-alive (symbol-name
this-command)))))
(corfu--update-display beg end str metadata))
;; When after `completion-at-point/corfu-complete', no further completion
is possible and the
;; current string is a valid match, exit with status 'finished.
- [elpa] externals/corfu updated (71386bf -> 1db9916), Protesilaos Stavrou, 2021/04/27
- [elpa] externals/corfu 8b4d5d8 02/11: Simplify corfu--restore-on-next-command, Protesilaos Stavrou, 2021/04/27
- [elpa] externals/corfu 6dfa254 01/11: Fix corfu-show-location, Protesilaos Stavrou, 2021/04/27
- [elpa] externals/corfu 6845fb0 03/11: Simplify corfu--pre-command-hook, Protesilaos Stavrou, 2021/04/27
- [elpa] externals/corfu a04dfe5 04/11: Add `corfu-confirm`, more tolerance for typos (Fix #14), Protesilaos Stavrou, 2021/04/27
- [elpa] externals/corfu fe8674a 05/11: Ensure that the corfu popup works with `dabbrev-completion`, Protesilaos Stavrou, 2021/04/27
- [elpa] externals/corfu 1db9916 11/11: Show "No match" message if no candidates are found, Protesilaos Stavrou, 2021/04/27
- [elpa] externals/corfu 5641e3b 06/11: Update readme, Protesilaos Stavrou, 2021/04/27
- [elpa] externals/corfu 0b87702 07/11: Add `corfu-excluded-modes`, Protesilaos Stavrou, 2021/04/27
- [elpa] externals/corfu 9dc4759 09/11: Exit conditions: Minor cleanup,
Protesilaos Stavrou <=
- [elpa] externals/corfu ed3a26b 10/11: Better guarding against errors during candidate generation, Protesilaos Stavrou, 2021/04/27
- [elpa] externals/corfu ba858df 08/11: Guard against dabbrev error if there are no matches, Protesilaos Stavrou, 2021/04/27