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

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

[elpa] master 6b40d40 156/184: ivy.el (ivy--occur-press-update-window):


From: Oleh Krehel
Subject: [elpa] master 6b40d40 156/184: ivy.el (ivy--occur-press-update-window): Re-use ivy-highlight-grep-commands
Date: Wed, 16 Oct 2019 13:15:13 -0400 (EDT)

branch: master
commit 6b40d40e04dc810e3cc2366f55936d19823a97a9
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    ivy.el (ivy--occur-press-update-window): Re-use ivy-highlight-grep-commands
---
 ivy.el | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/ivy.el b/ivy.el
index 1c44f22..fa78cf0 100644
--- a/ivy.el
+++ b/ivy.el
@@ -4879,8 +4879,9 @@ EVENT gives the mouse position."
 (defvar ivy-occur-timer nil)
 
 (defun ivy--occur-press-update-window ()
-  (cl-case (ivy-state-caller ivy-occur-last)
-    ((swiper swiper-isearch counsel-git-grep counsel-grep counsel-ag 
counsel-rg)
+  (cond
+    ((memq (ivy-state-caller ivy-occur-last)
+           (append '(swiper swiper-isearch) ivy-highlight-grep-commands))
      (let ((window (ivy-state-window ivy-occur-last))
            (buffer (ivy-state-buffer ivy-occur-last)))
        (when (buffer-live-p buffer)
@@ -4893,7 +4894,8 @@ EVENT gives the mouse position."
                 (with-selected-window window
                   (switch-to-buffer buffer)))))))
 
-    ((counsel-describe-function counsel-describe-variable)
+    ((memq (ivy-state-caller ivy-occur-last)
+           '(counsel-describe-function counsel-describe-variable))
      (setf (ivy-state-window ivy-occur-last)
            (selected-window))
      (selected-window))))



reply via email to

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