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

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

[elpa] master 6a8da39 206/272: counsel.el (counsel-grep-action): Reveal


From: Oleh Krehel
Subject: [elpa] master 6a8da39 206/272: counsel.el (counsel-grep-action): Reveal outlines
Date: Mon, 25 Apr 2016 10:13:26 +0000

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

    counsel.el (counsel-grep-action): Reveal outlines
    
    Just like swiper.
---
 counsel.el |   12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/counsel.el b/counsel.el
index ebdca2f..5a73bf2 100644
--- a/counsel.el
+++ b/counsel.el
@@ -1369,11 +1369,13 @@ This uses `counsel-ag' with `counsel-pt-base-command' 
replacing
         (goto-char (point-min))
         (forward-line (1- (string-to-number line-number)))
         (re-search-forward (ivy--regex ivy-text t) (line-end-position) t)
-        (unless (eq ivy-exit 'done)
-          (swiper--cleanup)
-          (isearch-range-invisible (line-beginning-position)
-                                   (line-end-position))
-          (swiper--add-overlays (ivy--regex ivy-text)))))))
+        (if (eq ivy-exit 'done)
+            (swiper--ensure-visible)
+          (unless (eq ivy-exit 'done)
+            (swiper--cleanup)
+            (isearch-range-invisible (line-beginning-position)
+                                     (line-end-position))
+            (swiper--add-overlays (ivy--regex ivy-text))))))))
 
 ;;;###autoload
 (defun counsel-grep ()



reply via email to

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