branch: master commit 607d9438eb86f6c028e1af26576ecb816b604b6b Author: Oleh Krehel <ohwoeo...@gmail.com> Commit: Oleh Krehel <ohwoeo...@gmail.com>
Add a hack for kill-buffer and invisible buffer * ivy.el (ivy-read): When COLLECTION is 'internal-complete-buffer, ignore the fact that REQUIRE-MATCH was set to t. Normally, when REQUIRE-MATCH is t, the COLLECTION should not be extended with PRESELECT. Fixes #135 --- ivy.el | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/ivy.el b/ivy.el index f4ff270..e3c4bea 100644 --- a/ivy.el +++ b/ivy.el @@ -714,7 +714,8 @@ candidates with each input." (<= (length coll) ivy-sort-max-size)) (setq coll (cl-sort (copy-sequence coll) sort-fn)))))) (when preselect - (unless (or require-match + (unless (or (and require-match + (not (eq collection 'internal-complete-buffer))) (let ((re (format "\\`%s" (regexp-quote preselect)))) (cl-find-if (lambda (x) (string-match re x)) coll)))