branch: master commit 8b4693cb0ce31b7f0fc00e8431c4535080f46fcf Author: Brian Leung <leun...@mailfence.com> Commit: Brian Leung <leun...@mailfence.com>
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 ()