diff options
| author | Daniel Mendler <mail@daniel-mendler.de> | 2021-10-11 17:06:55 +0200 |
|---|---|---|
| committer | Daniel Mendler <mail@daniel-mendler.de> | 2021-10-11 17:07:05 +0200 |
| commit | f30dc711a67c4fac049dd44c4a143249a3cd191f (patch) | |
| tree | 2fb9bb2e500a7a3ea1ed0dc127212a10bf0ece4d /corfu.el | |
| parent | 7e0c9f767cce0b6a02cb02a3132844c0adcaedf4 (diff) | |
Check that completion field is non-empty
Diffstat (limited to 'corfu.el')
| -rw-r--r-- | corfu.el | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -529,10 +529,11 @@ completion began less than that number of seconds ago." (setq all (if-let (sort (corfu--metadata-get metadata 'display-sort-function)) (funcall sort all) (sort all #'corfu--sort-predicate))) - (setq all (corfu--move-prefix-candidates-to-front field all)) - (when (and completing-file (not (string-suffix-p "/" field))) - (setq all (corfu--move-to-front (concat field "/") all))) - (setq all (corfu--move-to-front field all)) + (unless (equal field "") + (setq all (corfu--move-prefix-candidates-to-front field all)) + (when (and completing-file (not (string-suffix-p "/" field))) + (setq all (corfu--move-to-front (concat field "/") all))) + (setq all (corfu--move-to-front field all))) (list base (length all) all hl))) (defun corfu--update-candidates (str metadata pt table pred) |
