]> code.delx.au - gnu-emacs-elpa/commitdiff
ivy.el (ivy-occur): Fix when ivy--old-re isn't a string
authorOleh Krehel <ohwoeowho@gmail.com>
Thu, 7 Jan 2016 16:32:31 +0000 (17:32 +0100)
committerOleh Krehel <ohwoeowho@gmail.com>
Thu, 7 Jan 2016 16:33:39 +0000 (17:33 +0100)
ivy.el

diff --git a/ivy.el b/ivy.el
index 2728cb2c9cefcac4b10fabb55c70c7b6ec915272..b91ad4ce7816171bb9457c36bb7e1a257d7f2333 100644 (file)
--- a/ivy.el
+++ b/ivy.el
@@ -2429,7 +2429,10 @@ There is no limit on the number of *ivy-occur* buffers."
             (setq ivy--old-cands
                   (split-string
                    (shell-command-to-string
-                    (format counsel-git-grep-cmd ivy--old-re))
+                    (format counsel-git-grep-cmd
+                            (if (stringp ivy--old-re)
+                                ivy--old-re
+                              (caar ivy--old-re))))
                    "\n"
                    t))
             (ivy-occur-grep-mode))