branch: master
commit ba49407c5b4c719dd5dcc298c260513abf0c70df
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>

    counsel.el (counsel-ag-function): Improve for fancy faces
    
    Set `ivy--old-re' in order for fancy `ivy-display-style' to work.
---
 counsel.el |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/counsel.el b/counsel.el
index 7332e89..ac04e67 100644
--- a/counsel.el
+++ b/counsel.el
@@ -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)))

Reply via email to