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

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

[elpa] master 501ac71 151/184: ivy.el (ivy-occur-revert-buffer): Re-use


From: Oleh Krehel
Subject: [elpa] master 501ac71 151/184: ivy.el (ivy-occur-revert-buffer): Re-use ivy-highlight-grep-commands
Date: Wed, 16 Oct 2019 13:15:12 -0400 (EDT)

branch: master
commit 501ac712dfda5af28e717f0c0b873db025d80385
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    ivy.el (ivy-occur-revert-buffer): Re-use ivy-highlight-grep-commands
---
 counsel.el | 3 ++-
 ivy.el     | 4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/counsel.el b/counsel.el
index 7b6aaac..39385f0 100644
--- a/counsel.el
+++ b/counsel.el
@@ -3109,7 +3109,8 @@ When non-nil, INITIAL-INPUT is the initial search 
pattern."
   :unwind-fn #'counsel--grep-unwind
   :index-fn #'ivy-recompute-index-swiper-async
   :occur #'counsel-grep-occur
-  :more-chars 2)
+  :more-chars 2
+  :grep-p t)
 
 ;;;###autoload
 (defun counsel-grep-backward (&optional initial-input)
diff --git a/ivy.el b/ivy.el
index 8ff3464..21dcf3b 100644
--- a/ivy.el
+++ b/ivy.el
@@ -3855,7 +3855,7 @@ Note: The usual last two arguments are flipped for 
convenience.")
          (str (if (eq ivy-display-style 'fancy)
                   (if (memq (ivy-state-caller ivy-last)
                             ivy-highlight-grep-commands)
-                      (let* ((start (if (string-match "\\`[^:]+:[^:]+:" str)
+                      (let* ((start (if (string-match 
"\\`[^:]+:\\(?:[^:]+:\\)?" str)
                                         (match-end 0) 0))
                              (file (substring str 0 start))
                              (match (substring str start)))
@@ -4827,7 +4827,7 @@ updated original buffer."
                (erase-buffer)
                (funcall (plist-get ivy--occurs-list caller) t)
                (ivy-occur-grep-mode))))
-          ((memq caller '(counsel-git-grep counsel-grep counsel-ag counsel-rg))
+          ((memq caller ivy-highlight-grep-commands)
            (let ((inhibit-read-only t)
                  (line (line-number-at-pos)))
              (erase-buffer)



reply via email to

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