[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 5d2938f 126/184: counsel.el (counsel-git-grep): Works with
From: |
Oleh Krehel |
Subject: |
[elpa] master 5d2938f 126/184: counsel.el (counsel-git-grep): Works with ivy--regex-fuzzy |
Date: |
Wed, 16 Oct 2019 13:15:04 -0400 (EDT) |
branch: master
commit 5d2938f4a43d4f7290c80d77a756f971efd6160c
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
counsel.el (counsel-git-grep): Works with ivy--regex-fuzzy
`ivy-occur' works as well.
Fixes #2243
---
counsel.el | 9 ++++++++-
ivy.el | 2 +-
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/counsel.el b/counsel.el
index b313d86..061a85c 100644
--- a/counsel.el
+++ b/counsel.el
@@ -1356,7 +1356,11 @@ Typical value: '(recenter)."
(defun counsel-git-grep-cmd-function-default (str)
(format counsel-git-grep-cmd
- (setq ivy--old-re (ivy--regex str t))))
+ (setq ivy--old-re
+ (if (eq ivy--regex-function #'ivy--regex-fuzzy)
+ (replace-regexp-in-string
+ "\n" "" (ivy--regex-fuzzy str))
+ (ivy--regex str t)))))
(defun counsel-git-grep-cmd-function-ignore-order (str)
(setq ivy--old-re (ivy--regex str t))
@@ -1543,6 +1547,9 @@ When CMD is non-nil, prompt for a specific \"git grep\"
command."
(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))
(positive-pattern (replace-regexp-in-string
;; git-grep can't handle .*?
"\\.\\*\\?" ".*"
diff --git a/ivy.el b/ivy.el
index 9bb5cad..05d8803 100644
--- a/ivy.el
+++ b/ivy.el
@@ -2465,7 +2465,7 @@ See `completion-in-region' for further information."
(string= str (car comps))))
(message "Sole match"))
(t
- (when (eq collection #'crm--collection-fn)
+ (when (eq collection 'crm--collection-fn)
(setq comps (delete-dups comps)))
(let* ((len (ivy-completion-common-length (car comps)))
(initial (cond ((= len 0)
- [elpa] master 0b85d9d 030/184: counsel.el (counsel-at-git-issue-p): Add vc-git-log-view-mode, (continued)
- [elpa] master 0b85d9d 030/184: counsel.el (counsel-at-git-issue-p): Add vc-git-log-view-mode, Oleh Krehel, 2019/10/16
- [elpa] master 2db2c51 050/184: counsel.el (counsel-find-file-mkdir-action): make parents too, Oleh Krehel, 2019/10/16
- [elpa] master f90bc8c 164/184: ivy.el (ivy-configure): Add :height, Oleh Krehel, 2019/10/16
- [elpa] master 09c40fc 175/184: swiper.el (swiper--occur-insert-lines): Simplify, Oleh Krehel, 2019/10/16
- [elpa] master c69deb2 179/184: ivy.el: "~~" now works as expected for /sudo::, Oleh Krehel, 2019/10/16
- [elpa] master 24a6354 170/184: ivy.el (ivy--format): Improve docstring, Oleh Krehel, 2019/10/16
- [elpa] master 0d842e3 062/184: ivy.el (ivy-switch-buffer): Clean up, Oleh Krehel, 2019/10/16
- [elpa] master 560957f 074/184: Check if ivy--done is accepting a string., Oleh Krehel, 2019/10/16
- [elpa] master 3b4956a 123/184: counsel.el (counsel-evil-registers-height): Remove obsolete var, Oleh Krehel, 2019/10/16
- [elpa] master a1bb702 128/184: Nicer message when counsel-git-grep finds no match, Oleh Krehel, 2019/10/16
- [elpa] master 5d2938f 126/184: counsel.el (counsel-git-grep): Works with ivy--regex-fuzzy,
Oleh Krehel <=
- [elpa] master 3a37741 147/184: swiper.el (swiper--update-input-ivy): Set case-fold-search, Oleh Krehel, 2019/10/16
- [elpa] master dea98fc 153/184: ivy.el (ivy-inhibit-action): Clean up docstring, Oleh Krehel, 2019/10/16
- [elpa] master 92f54f6 150/184: ivy.el (ivy-configure): Add :grep-p, Oleh Krehel, 2019/10/16
- [elpa] master abe5aa8 006/184: ivy.el (ivy-resume): Select original buffer for search functions, Oleh Krehel, 2019/10/16
- [elpa] master bfe4454 021/184: Fix swiper--isearch-filter-ignore-order return value, Oleh Krehel, 2019/10/16
- [elpa] master bb65c4e 039/184: swiper.el (swiper--current-window-start): Refactor, Oleh Krehel, 2019/10/16
- [elpa] master 76fff20 114/184: counsel-M-x: Propertize names of active modes., Oleh Krehel, 2019/10/16
- [elpa] master bfdda68 111/184: swiper.el (swiper-occur): Use ivy-occur-next-error, Oleh Krehel, 2019/10/16
- [elpa] master 84e1ab8 117/184: counsel.el (counsel-package): Refresh contents automatically, Oleh Krehel, 2019/10/16
- [elpa] master 9d3d7de 132/184: counsel.el (counsel-slime-repl-history): Add., Oleh Krehel, 2019/10/16