branch: master
commit b49ed2faf928c54eb79163cdcb32c4aa94c01213
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
ivy.el (ivy--reset-state): Add stringp preselect guard
---
ivy.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ivy.el b/ivy.el
index 2f966e5..48dd39f 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1569,7 +1569,8 @@ This is useful for recursive `ivy-read'."
(setq coll (cl-sort (copy-sequence coll) sort-fn))))))
(setq coll (ivy--set-candidates coll))
(when preselect
- (unless (or (and require-match
+ (unless (or (not (stringp preselect))
+ (and require-match
(not (eq collection 'internal-complete-buffer)))
dynamic-collection
(let ((re (regexp-quote preselect)))