emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/ivy-hydra e3fc84f 104/395: counsel.el (counsel--git-gre


From: Basil L. Contovounesios
Subject: [elpa] externals/ivy-hydra e3fc84f 104/395: counsel.el (counsel--git-grep-occur-cmd): Simplify
Date: Thu, 25 Feb 2021 08:31:41 -0500 (EST)

branch: externals/ivy-hydra
commit e3fc84fb73a2d0882dd3616a567f6b54a10d3329
Author: Oleh Krehel <ohwoeowho@gmail.com>
Commit: Oleh Krehel <ohwoeowho@gmail.com>

    counsel.el (counsel--git-grep-occur-cmd): Simplify
---
 counsel.el | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/counsel.el b/counsel.el
index 0d8c212..b0c7dbe 100644
--- a/counsel.el
+++ b/counsel.el
@@ -1347,7 +1347,8 @@ Typical value: '(recenter)."
   :type 'hook)
 
 (defcustom counsel-git-grep-cmd-function 
#'counsel-git-grep-cmd-function-default
-  "How a git-grep shell call is built from the input."
+  "How a git-grep shell call is built from the input.
+This function should set `ivy--old-re'."
   :type '(radio
           (function-item counsel-git-grep-cmd-function-default)
           (function-item counsel-git-grep-cmd-function-ignore-order)
@@ -1557,10 +1558,7 @@ When CMD is non-nil, prompt for a specific \"git grep\" 
command."
   str)
 
 (defun counsel--git-grep-occur-cmd (input)
-  (let* ((regex (funcall ivy--regex-function input))
-         (regex (if (eq ivy--regex-function #'ivy--regex-fuzzy)
-                    (replace-regexp-in-string "\n" "" regex)
-                  regex))
+  (let* ((regex ivy--old-re)
          (positive-pattern (replace-regexp-in-string
                             ;; git-grep can't handle .*?
                             "\\.\\*\\?" ".*"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]