branch: externals/ivy-hydra
commit 47bd7b16ac7b1f95ffc808ea1dd159eb95d03056
Author: Emilio Lopes <[email protected]>
Commit: Emilio Lopes <[email protected]>

    Handle case correctly in `counsel-grep-like-occur'
---
 counsel.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/counsel.el b/counsel.el
index 1f8da84..f681510 100644
--- a/counsel.el
+++ b/counsel.el
@@ -2946,7 +2946,10 @@ Works for `counsel-git-grep', `counsel-ag', etc."
             (let* ((command-args (counsel--split-command-args ivy-text))
                    (regex (counsel--grep-regex (cdr command-args)))
                    (switches (concat (car command-args)
-                                     (counsel--ag-extra-switches regex))))
+                                     (counsel--ag-extra-switches regex)
+                                     (if (ivy--case-fold-p ivy-text)
+                                         " -i "
+                                       " -s "))))
               (format cmd-template
                       (concat
                        switches

Reply via email to