summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mendler <mail@daniel-mendler.de>2026-04-19 20:01:44 +0200
committerDaniel Mendler <mail@daniel-mendler.de>2026-04-19 20:01:44 +0200
commitd86f5aa5d1e2ad3be153285c598458435b95b460 (patch)
tree880d92cd5ba7b53b3b2854ca7008da0ae78d2084
parent20009d4fcc31770200b63a1440f15320ee009def (diff)
Delete duplicate candidates later
Delete later such that candidates which match the input exactly (corfu--move-to-front) are deduplicated.
-rw-r--r--corfu.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/corfu.el b/corfu.el
index 37c7907..97d05ca 100644
--- a/corfu.el
+++ b/corfu.el
@@ -666,11 +666,11 @@ FRAME is the existing frame."
;; `:exit-function' to help Capfs with candidate disambiguation. This
;; matters in particular for Lsp backends, which produce duplicates for
;; overloaded methods.
- (setq all (corfu--delete-dups (funcall (or (corfu--sort-function) #'identity) all))
+ (setq all (funcall (or (corfu--sort-function) #'identity) all)
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)
+ (setq all (corfu--delete-dups (corfu--move-to-front field all))
pre (if (or (eq corfu-preselect 'prompt) (not all)
(and completing-file (eq corfu-preselect 'directory)
(= (length corfu--base) (length str))