branch: master commit e94f13e3dfea60306f779189fd035b9d9e795ee7 Author: Oleh Krehel <ohwoeo...@gmail.com> Commit: Oleh Krehel <ohwoeo...@gmail.com>
counsel.el (counsel-imenu): Add :preselect Fixes #388 --- counsel.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/counsel.el b/counsel.el index b3549b1..5e5686f 100644 --- a/counsel.el +++ b/counsel.el @@ -1466,6 +1466,8 @@ PREFIX is used to create the key." (items (imenu--make-index-alist t)) (items (delete (assoc "*Rescan*" items) items))) (ivy-read "imenu items:" (counsel-imenu-get-candidates-from items) + :preselect (thing-at-point 'symbol) + :require-match t :action (lambda (candidate) (with-ivy-window ;; In org-mode, (imenu candidate) will expand child node