branch: externals/ivy-hydra
commit 884dd9ec0aeb1b76f92be4ba08b0eeb1cf35769c
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>

    counsel.el (counsel--git-grep-occur-cmd): Handle case folding
    
    Fixes #2309
---
 counsel.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/counsel.el b/counsel.el
index c38be2d..875fdea 100644
--- a/counsel.el
+++ b/counsel.el
@@ -1567,7 +1567,10 @@ When CMD is non-nil, prompt for a specific \"git grep\" 
command."
                               (format "| grep -v %s" (car x))))
                        regex
                        " "))))
-    (concat (format counsel-git-grep-cmd positive-pattern) negative-patterns)))
+    (concat
+     (format counsel-git-grep-cmd positive-pattern)
+     negative-patterns
+     (if (ivy--case-fold-p input) " -i" ""))))
 
 (defun counsel-git-grep-occur (&optional _cands)
   "Generate a custom occur buffer for `counsel-git-grep'."

Reply via email to