[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master be989fe 60/63: Preselect perfect matches with a leading ^
From: |
Oleh Krehel |
Subject: |
[elpa] master be989fe 60/63: Preselect perfect matches with a leading ^ |
Date: |
Fri, 21 Aug 2015 12:08:49 +0000 |
branch: master
commit be989fe5aa9db153931ec61f1ff2940650ec6563
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
Preselect perfect matches with a leading ^
* ivy.el (ivy--filter): When e.g. "filter" is in the collection,
"^filter" input should always select it, even if other candidates
match.
---
ivy.el | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/ivy.el b/ivy.el
index faa469b..21197c3 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1415,8 +1415,11 @@ CANDIDATES are assumed to be static."
(unless (and (not (equal re ivy--old-re))
(or (setq ivy--index
(or
- (cl-position re cands
- :test #'equal)
+ (cl-position (if (and (> (length re) 0)
+ (eq ?^ (aref re 0)))
+ (substring re 1)
+ re) cands
+ :test #'equal)
(and ivy--directory
(cl-position
(concat re "/") cands
- [elpa] master e7d778b 47/63: counsel.el (counsel-recoll): Simplify, (continued)
- [elpa] master e7d778b 47/63: counsel.el (counsel-recoll): Simplify, Oleh Krehel, 2015/08/21
- [elpa] master 5b61577 49/63: Use recoll -t instead of recollq, Oleh Krehel, 2015/08/21
- [elpa] master 8d82b98 51/63: swiper.el (swiper-from-isearch): New command, Oleh Krehel, 2015/08/21
- [elpa] master dba4e47 50/63: counsel.el (org-bound-and-true-p): Update declare, Oleh Krehel, 2015/08/21
- [elpa] master 1f0c79b 52/63: counsel.el (org-setting-tags): Declare dynamic var, Oleh Krehel, 2015/08/21
- [elpa] master 40c17b4 54/63: Add a few more Org declarations, Oleh Krehel, 2015/08/21
- [elpa] master 13d0c50 56/63: counsel.el (counsel-org-tag-agenda): New command, Oleh Krehel, 2015/08/21
- [elpa] master b8b951b 59/63: Allow ivy-count-format to be set as nil, Oleh Krehel, 2015/08/21
- [elpa] master a33af29 55/63: counsel.el (org-bound-and-true-p): Use bound-and-true-p, Oleh Krehel, 2015/08/21
- [elpa] master 6b57efe 57/63: Bind "C-M-j" to ivy-immediate-done, Oleh Krehel, 2015/08/21
- [elpa] master be989fe 60/63: Preselect perfect matches with a leading ^,
Oleh Krehel <=
- [elpa] master 476fc5d 58/63: Add with-ivy-window macro, Oleh Krehel, 2015/08/21
- [elpa] master 4443a8b 53/63: counsel.el (org-last-tags-completion-table): Declare, Oleh Krehel, 2015/08/21
- [elpa] master 098bec0 61/63: counsel.el (counsel-find-file): Fix window focus issue, Oleh Krehel, 2015/08/21
- [elpa] master 09f86fc 62/63: doc/Changelog.org: Add, Oleh Krehel, 2015/08/21
- [elpa] master f5dac47 63/63: Merge commit '09f86fca437f1b2e168093824e9d4ee0aea5130a' from swiper, Oleh Krehel, 2015/08/21