branch: master
commit 365008f8468b885cc03c0db347fa0eb996b6cd8d
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
ivy.el: Don't add :preselect to collection
Fixes #1017
---
ivy.el | 9 ---------
1 file changed, 9 deletions(-)
diff --git a/ivy.el b/ivy.el
index 750def1..d7441c6 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1709,15 +1709,6 @@ This is useful for recursive `ivy-read'."
(setq sort-fn (ivy--sort-function caller)))
(setq coll (cl-sort (copy-sequence coll) sort-fn)))))
(setq coll (ivy--set-candidates coll))
- (when preselect
- (unless (or (not (stringp preselect))
- (and require-match
- (not (eq collection 'internal-complete-buffer)))
- dynamic-collection
- (let ((re (regexp-quote preselect)))
- (cl-find-if (lambda (x) (string-match re x))
- coll)))
- (setq coll (cons preselect coll))))
(setq ivy--old-re nil)
(setq ivy--old-cands nil)
(when (integerp preselect)