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

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

[elpa] externals/ivy-hydra f90c018 389/395: counsel.el (counsel-grep-lik


From: Basil L. Contovounesios
Subject: [elpa] externals/ivy-hydra f90c018 389/395: counsel.el (counsel-grep-like-occur): Use ivy-text as backup
Date: Thu, 25 Feb 2021 08:32:45 -0500 (EST)

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

    counsel.el (counsel-grep-like-occur): Use ivy-text as backup
---
 counsel.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/counsel.el b/counsel.el
index f702ab5..7683722 100644
--- a/counsel.el
+++ b/counsel.el
@@ -3098,8 +3098,9 @@ Works for `counsel-git-grep', `counsel-ag', etc."
     (ivy-occur-grep-mode)
     (setq default-directory (ivy-state-directory ivy-last)))
   (ivy-set-text
-   (and (string-match "\"\\(.*\\)\"" (buffer-name))
-        (match-string 1 (buffer-name))))
+   (if (string-match "\"\\(.*\\)\"" (buffer-name))
+       (match-string 1 (buffer-name))
+     (ivy-state-text ivy-occur-last)))
   (let* ((cmd
           (if (functionp cmd-template)
               (funcall cmd-template ivy-text)



reply via email to

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