[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master b57c57d 153/167: Fix the preselect for (swiper "one") agai
From: |
Oleh Krehel |
Subject: |
[elpa] master b57c57d 153/167: Fix the preselect for (swiper "one") again |
Date: |
Tue, 08 Dec 2015 10:50:40 +0000 |
branch: master
commit b57c57de2831a8098a2d075c0174608fa1bc443b
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
Fix the preselect for (swiper "one") again
* ivy.el (ivy--reset-state): Take into account :preselect being integer.
This means that it's void once the candidates are filtered over
:initial-input.
Fixes #292
---
ivy.el | 24 ++++++++++++++----------
1 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/ivy.el b/ivy.el
index e89fbd3..a565629 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1199,21 +1199,25 @@ This is useful for recursive `ivy-read'."
(setq coll (cons preselect coll))))
(setq ivy--old-re nil)
(setq ivy--old-cands nil)
+ (when (integerp preselect)
+ (setq ivy--old-re "")
+ (setq ivy--index preselect))
(when initial-input
;; Needed for anchor to work
(setq ivy--old-cands coll)
(setq ivy--old-cands (ivy--filter initial-input coll)))
(setq ivy--all-candidates coll)
- (setq ivy--index (or
- (and dynamic-collection
- ivy--index)
- (and preselect
- (ivy--preselect-index
- preselect
- (if initial-input
- ivy--old-cands
- coll)))
- 0)))
+ (unless (integerp preselect)
+ (setq ivy--index (or
+ (and dynamic-collection
+ ivy--index)
+ (and preselect
+ (ivy--preselect-index
+ preselect
+ (if initial-input
+ ivy--old-cands
+ coll)))
+ 0))))
(setq ivy-exit nil)
(setq ivy--default (or
(thing-at-point 'url)
- [elpa] master 0c62f7e 132/167: ivy.el (ivy-alt-done): Split into smaller defuns, (continued)
- [elpa] master 0c62f7e 132/167: ivy.el (ivy-alt-done): Split into smaller defuns, Oleh Krehel, 2015/12/08
- [elpa] master 59df2e9 131/167: ivy.el (ivy-alt-done): Refactor, Oleh Krehel, 2015/12/08
- [elpa] master 2bec99d 146/167: Ease production of functions like ivy-format-function-default, Oleh Krehel, 2015/12/08
- [elpa] master c546ae4 150/167: Enable recursive swiper calls, Oleh Krehel, 2015/12/08
- [elpa] master 1bf4ae2 140/167: Warn the user about the behavior of ivy--regex-ignore-order, Oleh Krehel, 2015/12/08
- [elpa] master 99d214d 142/167: Ivy-resume should restore the buffer for swiper, Oleh Krehel, 2015/12/08
- [elpa] master 8abed59 143/167: Add counsel-grep, Oleh Krehel, 2015/12/08
- [elpa] master 3b67044 145/167: Convert ivy formatting functions to dotted pairs., Oleh Krehel, 2015/12/08
- [elpa] master ac09f6b 152/167: Fix the issue caused by recursive swiper calls, Oleh Krehel, 2015/12/08
- [elpa] master a34e532 155/167: swiper.el: Use show-all if outline-show-all isn't there, Oleh Krehel, 2015/12/08
- [elpa] master b57c57d 153/167: Fix the preselect for (swiper "one") again,
Oleh Krehel <=
- [elpa] master a585fcd 156/167: Fix due to visual-line-mode weirdness, Oleh Krehel, 2015/12/08
- [elpa] master 1cf32c8 138/167: ivy.org manual edits, Oleh Krehel, 2015/12/08
- [elpa] master 7377445 147/167: Edit documentation strings in ivy.el, Oleh Krehel, 2015/12/08
- [elpa] master 1cceac1 154/167: Fix ivy-resume issue caused by the recursive calls change, Oleh Krehel, 2015/12/08
- [elpa] master ed9169d 158/167: swiper.el (swiper--update-input-ivy): Add a work-around for "M-j", Oleh Krehel, 2015/12/08
- [elpa] master 0332b3e 151/167: Remove 'field text property for twittering-mode, Oleh Krehel, 2015/12/08
- [elpa] master 5cfe6e6 148/167: Fixes on the previous docstring edits, Oleh Krehel, 2015/12/08
- [elpa] master 435e9d4 159/167: Use :caller for ivy-re-builders-alist, Oleh Krehel, 2015/12/08
- [elpa] master 8dd88e4 149/167: doc/Changelog.org: Update up to 2bec99d, Oleh Krehel, 2015/12/08
- [elpa] master 706349f 160/167: swiper.el (swiper-font-lock-ensure): Add vc-dir-mode, Oleh Krehel, 2015/12/08