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

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

[elpa] master 3c904fa 192/348: counsel.el (counsel-git-grep-occur): Fix


From: Oleh Krehel
Subject: [elpa] master 3c904fa 192/348: counsel.el (counsel-git-grep-occur): Fix "g"
Date: Sat, 8 Apr 2017 11:03:53 -0400 (EDT)

branch: master
commit 3c904fa01baa51c18084c71aa5c17fb880c3be9e
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    counsel.el (counsel-git-grep-occur): Fix "g"
    
    Things go wrong when `ivy-text' is changed from the original value and
    "g" is pressed. Extract `ivy-text' from the buffer name.
---
 counsel.el | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/counsel.el b/counsel.el
index 85708da..e17abeb 100644
--- a/counsel.el
+++ b/counsel.el
@@ -1151,6 +1151,9 @@ When REVERT is non-nil, regenerate the current 
*ivy-occur* buffer."
   (unless (eq major-mode 'ivy-occur-grep-mode)
     (ivy-occur-grep-mode)
     (setq default-directory counsel--git-grep-dir))
+  (setq ivy-text
+        (and (string-match "\"\\(.*\\)\"" (buffer-name))
+             (match-string 1 (buffer-name))))
   (let ((cands (split-string
                 (shell-command-to-string
                  (format counsel-git-grep-cmd



reply via email to

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