branch: master
commit b6d476ac614b3d3c5e6898db28801022472359e8
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
ivy.el (ivy--recompute-index): Fixup
Fixes #258
---
ivy.el | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/ivy.el b/ivy.el
index 235aca7..9aaaf72 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1613,8 +1613,9 @@ CANDIDATES are assumed to be static."
(cdr (assoc t ivy-index-functions-alist))
#'ivy-recompute-index-zero)))
(setq ivy--index
- (or (cl-position (nth ivy--index ivy--old-cands)
- cands)
+ (or (and (not (string= name ""))
+ (cl-position (nth ivy--index ivy--old-cands)
+ cands))
(funcall func re-str cands)))
(when (and (or (string= name "")
(string= name "^"))