branch: master
commit 6827edffb70890f2e94c3d146ed129bde581992d
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
counsel.el (counsel-git-grep-occur): Update
Fixes #1225
---
counsel.el | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/counsel.el b/counsel.el
index e4b4a95..06b3ee4 100644
--- a/counsel.el
+++ b/counsel.el
@@ -1361,11 +1361,12 @@ When REVERT is non-nil, regenerate the current
*ivy-occur* buffer."
"\\.\\*\\?" ".*"
(if (stringp regex) regex (caar regex))))
(negative-patterns
- (mapconcat (lambda (x)
- (and (null (cdr x))
- (format "| grep -v %s" (car x))))
- regex
- " "))
+ (if (stringp regex) ""
+ (mapconcat (lambda (x)
+ (and (null (cdr x))
+ (format "| grep -v %s" (car x))))
+ regex
+ " ")))
(cmd (concat (format counsel-git-grep-cmd positive-pattern)
negative-patterns))
cands)
(setq cands (split-string