]> code.delx.au - gnu-emacs-elpa/blobdiff - ivy.el
counsel.el (counsel-unquote-regex-parens): Improve
[gnu-emacs-elpa] / ivy.el
diff --git a/ivy.el b/ivy.el
index 2b7002c3484e3f52c9e36482cb211c1ad8ad7620..4f46ae451129f85f048b883ebb5cc083848d7524 100644 (file)
--- a/ivy.el
+++ b/ivy.el
@@ -911,6 +911,7 @@ Call the permanent action if possible."
       (progn
         (insert ivy--default)
         (when (and (with-ivy-window (derived-mode-p 'prog-mode))
+                   (eq (ivy-state-caller ivy-last) 'swiper)
                    (not (file-exists-p ivy--default))
                    (not (ffap-url-p ivy--default))
                    (not (ivy-state-dynamic-collection ivy-last))
@@ -1282,9 +1283,7 @@ customizations apply to the current completion session."
         (transformer-fn
          (plist-get ivy--display-transformers-list
                     (or caller (and (functionp collection)
-                                    collection))))
-        (original-action (and (consp action)
-                              (copy-sequence action))))
+                                    collection)))))
     (setq ivy-last
           (make-ivy-state
            :prompt prompt
@@ -1340,8 +1339,6 @@ customizations apply to the current completion session."
             (when recursive-ivy-last
               (ivy--reset-state (setq ivy-last recursive-ivy-last)))))
       (ivy-call)
-      (when original-action
-        (setf (ivy-state-action ivy-last) original-action))
       (when (and recursive-ivy-last
                  ivy-recursive-restore)
         (ivy--reset-state (setq ivy-last recursive-ivy-last))))))