branch: master commit 6b40d40e04dc810e3cc2366f55936d19823a97a9 Author: Oleh Krehel <ohwoeo...@gmail.com> Commit: Oleh Krehel <ohwoeo...@gmail.com>
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))))