[Top][All Lists]

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

[elpa] master e94f13e 104/272: counsel.el (counsel-imenu): Add :preselec

From: Oleh Krehel
Subject: [elpa] master e94f13e 104/272: counsel.el (counsel-imenu): Add :preselect
Date: Mon, 25 Apr 2016 10:13:19 +0000

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

    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)
                           ;; In org-mode, (imenu candidate) will expand child 

reply via email to

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