From e1e2ad104da740be1bc1f8189c3d4c2b472e047e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jo=C3=A3o=20T=C3=A1vora?= Date: Mon, 23 Dec 2019 12:08:43 +0100 Subject: [PATCH] Comment on limitation of flex completion style's sorting function * lisp/minibuffer.el (completion--flex-adjust-metadata): Add comment. --- lisp/minibuffer.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 6011a493d0b..0e9b1c199a3 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -3593,8 +3593,13 @@ that is non-nil." completions))) (cond ((or (not (window-minibuffer-p)) - (> (point-max) - (minibuffer-prompt-end))) + ;; JT@2019-12-23: FIXME: this is still wrong. What + ;; we need to test here is "some input that actually + ;; leads to flex filtering", not "something after + ;; the minibuffer prompt". The latter is always + ;; true for file searches, meaning the next clauses + ;; will be ignored. + (> (point-max) (minibuffer-prompt-end))) (sort pre-sorted (lambda (c1 c2) -- 2.39.2