From 7751773cb2165cf2ce2f8820c5b740fdb6b7e1ae Mon Sep 17 00:00:00 2001 From: Eric Danan Date: Tue, 17 Jul 2018 15:26:59 +0200 Subject: [PATCH] cp-grep: Update following upstream change in `counsel-more-chars` --- counsel-projectile.el | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/counsel-projectile.el b/counsel-projectile.el index f35b8a6..187a263 100644 --- a/counsel-projectile.el +++ b/counsel-projectile.el @@ -579,15 +579,14 @@ construct the command.") (defun counsel-projectile-grep-function (string) "Grep for STRING in the current project." - (if (< (length string) 3) - (counsel-more-chars 3) - (let ((default-directory (ivy-state-directory ivy-last)) - (regex (counsel-unquote-regex-parens - (setq ivy--old-re - (ivy--regex string))))) - (counsel--async-command (format counsel-projectile-grep-command - (shell-quote-argument regex))) - nil))) + (or (counsel-more-chars) + (let ((default-directory (ivy-state-directory ivy-last)) + (regex (counsel-unquote-regex-parens + (setq ivy--old-re + (ivy--regex string))))) + (counsel--async-command (format counsel-projectile-grep-command + (shell-quote-argument regex))) + nil))) (defun counsel-projectile-grep-transformer (str) "Higlight file and line number in STR, first removing the