From d86f5aa5d1e2ad3be153285c598458435b95b460 Mon Sep 17 00:00:00 2001 From: Daniel Mendler Date: Sun, 19 Apr 2026 20:01:44 +0200 Subject: Delete duplicate candidates later Delete later such that candidates which match the input exactly (corfu--move-to-front) are deduplicated. --- corfu.el | 4 ++-- 1 file 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)) -- cgit v1.0