branch: master commit c546ae47503b3dfa76bebaa461ce6febe700f753 Author: Oleh Krehel <ohwoeo...@gmail.com> Commit: Oleh Krehel <ohwoeo...@gmail.com>
Enable recursive swiper calls * ivy.el (ivy-read): Don't need to be in the minibuffer to do a recursive store/restore. (ivy--reset-state): Avoid nil string while testing. Fixes #309 --- ivy.el | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ivy.el b/ivy.el index ff7b2b2..e89fbd3 100644 --- a/ivy.el +++ b/ivy.el @@ -1056,7 +1056,7 @@ customizations apply to the current completion session." ("o" ,action "default") ,@extra-actions) (delete-dups (append action extra-actions)))))) - (let ((recursive-ivy-last (and (window-minibuffer-p) ivy-last))) + (let ((recursive-ivy-last ivy-last)) (setq ivy-last (make-ivy-state :prompt prompt @@ -1114,7 +1114,7 @@ customizations apply to the current completion session." (defun ivy--reset-state (state) "Reset the ivy to STATE. This is useful for recursive `ivy-read'." - (let ((prompt (ivy-state-prompt state)) + (let ((prompt (or (ivy-state-prompt state) "")) (collection (ivy-state-collection state)) (predicate (ivy-state-predicate state)) (history (ivy-state-history state))