emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master e1e2ad1 2/2: Comment on limitation of flex completion style's sor


From: João Távora
Subject: master e1e2ad1 2/2: Comment on limitation of flex completion style's sorting function
Date: Mon, 23 Dec 2019 06:09:37 -0500 (EST)

branch: master
commit e1e2ad104da740be1bc1f8189c3d4c2b472e047e
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>

    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 6011a49..0e9b1c1 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]