]> code.delx.au - gnu-emacs-elpa/commitdiff
counsel.el (counsel-ag-function): Improve for fancy faces
authorOleh Krehel <ohwoeowho@gmail.com>
Tue, 29 Sep 2015 12:40:10 +0000 (14:40 +0200)
committerOleh Krehel <ohwoeowho@gmail.com>
Tue, 29 Sep 2015 12:40:10 +0000 (14:40 +0200)
Set `ivy--old-re' in order for fancy `ivy-display-style' to work.

counsel.el

index 7332e89063665dde8f200d32966c961f86fe9944..ac04e6775ae2e51152674e21c70b69e4bb67c19f 100644 (file)
@@ -986,7 +986,9 @@ Usable with `ivy-resume', `ivy-next-line-and-call' and
   "Grep in the current directory for STRING."
   (if (< (length string) 3)
       (counsel-more-chars 3)
-    (let ((regex (counsel-unquote-regex-parens (ivy--regex string))))
+    (let ((regex (counsel-unquote-regex-parens
+                  (setq ivy--old-re
+                        (ivy--regex string)))))
       (counsel--async-command
        (format "ag --noheading --nocolor %S" regex))
       nil)))