[Top][All Lists]

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

[elpa] master 76ef143 258/399: swiper.el (swiper-isearch): Fix ivy-occur

From: Oleh Krehel
Subject: [elpa] master 76ef143 258/399: swiper.el (swiper-isearch): Fix ivy-occur
Date: Sat, 20 Jul 2019 14:57:35 -0400 (EDT)

branch: master
commit 76ef14399c9ea656b06b3cf9ccdb163e4d06c942
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    swiper.el (swiper-isearch): Fix ivy-occur
 swiper.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/swiper.el b/swiper.el
index cc7d417..ec562e8 100644
--- a/swiper.el
+++ b/swiper.el
@@ -538,6 +538,8 @@ such as `scroll-conservatively' are set to a high value.")
 (defun swiper--occur-cands (fname cands)
   (when cands
     (with-current-buffer (ivy-state-buffer ivy-last)
+      (when (eq (ivy-state-caller ivy-last) 'swiper-isearch)
+        (setq cands (mapcar #'swiper--line-at-point cands)))
       (let* ((pt-min (point-min))
@@ -1279,7 +1281,9 @@ come back to the same place as when \"a\" was initially 
 (defun swiper-isearch-action (x)
   "Move to X for `swiper-isearch'."
-  (if (numberp x)
+  (if (or (numberp x)
+          (and (> (length x) 0)
+               (setq x (get-text-property 0 'point x))))
         (goto-char x)
         (isearch-range-invisible (line-beginning-position)

reply via email to

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