ソースを参照

Enable limited flex-matching for dynamic collections

Previously, for dynamic collections, ido-cr+ was limited to prefix
matching. Now all the initially availble completion candidates are
retained, and only dynamically-added candidates are limited to prefix
matching.

This isn't going to be sufficient for functions that implementn
fancier completion behaviors. The solution for those is still
blacklisting.
Ryan C. Thompson 8 年 前
コミット
9f44c78667
1 ファイル変更10 行追加3 行削除
  1. 10 3
      ido-completing-read+.el

+ 10 - 3
ido-completing-read+.el

@@ -501,9 +501,16 @@ sets up C-j to be equivalent to TAB in the same situation."
               (def (nth 6 ido-cr+-orig-completing-read-args))
               (predicate (nth 2 ido-cr+-orig-completing-read-args)))
           (setq ido-cur-list
-                (all-completions current-ido-text
-                                 ido-cr+-dynamic-collection
-                                 predicate))
+                (delete-dups
+                 (append
+                  (all-completions
+                   current-ido-text
+                   ido-cr+-dynamic-collection
+                   predicate)
+                  (all-completions
+                   ""
+                   ido-cr+-dynamic-collection
+                   predicate))))
           (unless (listp def)
             (setq def (list def)))
           (when def