]> code.delx.au - gnu-emacs-elpa/blobdiff - ivy.el
ivy.el (ivy--format-minibuffer-line): Update
[gnu-emacs-elpa] / ivy.el
diff --git a/ivy.el b/ivy.el
index 8e12408f300ce6224cdd4002179dc277cd5626b7..f664e5dab1a44f2dbf03c170a70ed9c0846439f8 100644 (file)
--- a/ivy.el
+++ b/ivy.el
@@ -893,12 +893,13 @@ Example use:
     (let ((action (ivy--get-action ivy-last)))
       (when action
         (let* ((collection (ivy-state-collection ivy-last))
-               (x (if (and (consp collection)
-                           (consp (car collection)))
-                      (cdr (assoc ivy--current collection))
-                    (if (equal ivy--current "")
-                        ivy-text
-                      ivy--current))))
+               (x (cond ((and (consp collection)
+                              (consp (car collection))
+                              (cdr (assoc ivy--current collection))))
+                        ((equal ivy--current "")
+                         ivy-text)
+                        (t
+                         ivy--current))))
           (prog1 (funcall action x)
             (unless (or (eq ivy-exit 'done)
                         (equal (selected-window)
@@ -2439,7 +2440,8 @@ SEPARATOR is used to join the candidates."
 
 (defun ivy--format-minibuffer-line (str)
   (let ((start
-         (if (and (memq (ivy-state-caller ivy-last) '(counsel-git-grep))
+         (if (and (memq (ivy-state-caller ivy-last)
+                        '(counsel-git-grep counsel-ag counsel-pt))
                   (string-match "^[^:]+:[^:]+:" str))
              (match-end 0)
            0))