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

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

[elpa] master 8b4693c 169/184: counsel.el (counsel-imenu-action and -get


From: Oleh Krehel
Subject: [elpa] master 8b4693c 169/184: counsel.el (counsel-imenu-action and -get-canditates-from): Revert.
Date: Wed, 16 Oct 2019 13:15:16 -0400 (EDT)

branch: master
commit 8b4693cb0ce31b7f0fc00e8431c4535080f46fcf
Author: Brian Leung <address@hidden>
Commit: Brian Leung <address@hidden>

    counsel.el (counsel-imenu-action and -get-canditates-from): Revert.
    
    `imenu` is preferred over `goto-char` since the latter doesn't work in
    pdf-tools buffers, and doesn't auto-expand parents of hidden Org
    subtrees that get visited.
---
 counsel.el | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/counsel.el b/counsel.el
index 2a96243..5ce68ee 100644
--- a/counsel.el
+++ b/counsel.el
@@ -4256,9 +4256,9 @@ PREFIX is used to create the key."
                       ": "))
                    (car elm))))
          (list (cons key
-                     (if (overlayp (cdr elm))
-                         (overlay-start (cdr elm))
-                       (cdr elm)))))))
+                     (cons key (if (overlayp (cdr elm))
+                                   (overlay-start (cdr elm))
+                                 (cdr elm))))))))
    alist))
 
 (defvar counsel-imenu-map
@@ -4275,8 +4275,8 @@ PREFIX is used to create the key."
       items)))
 
 (defun counsel-imenu-action (x)
-  (when x
-    (goto-char (cdr x))))
+  (with-ivy-window
+    (imenu (cdr x))))
 
 ;;;###autoload
 (defun counsel-imenu ()



reply via email to

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