summaryrefslogtreecommitdiff
path: root/helm-imenu.el
diff options
context:
space:
mode:
authorThierry Volpiatto <thierry.volpiatto@gmail.com>2019-07-30 06:29:28 +0200
committerThierry Volpiatto <thierry.volpiatto@gmail.com>2019-07-30 06:49:48 +0200
commitc400a9f38257964d0c5ae4fc1f740a968f517d25 (patch)
tree3ed4bacc0a6f77bcbcc9d3895bea681d00ffb734 /helm-imenu.el
parentfba8b267b7d967a1379863828b71cdb974b1b8c6 (diff)
Prevent follow-mode when moving between sections
in imenu. NOTE: `helm-imenu-next-or-previous-section` uses now a new macro, expect some user errors at Melpa install. * helm-lib.el (helm-without-follow): New macro. * helm-imenu.el (helm-imenu-next-or-previous-section): Do it by wrapping calls to helm-next/previous-line in new macro.
Diffstat (limited to 'helm-imenu.el')
-rw-r--r--helm-imenu.el12
1 files changed, 6 insertions, 6 deletions
diff --git a/helm-imenu.el b/helm-imenu.el
index 5d41caf3..e84134fe 100644
--- a/helm-imenu.el
+++ b/helm-imenu.el
@@ -112,11 +112,11 @@ Each car is a regexp match pattern of the imenu type string."
(stop-fn (if (> n 0)
#'helm-end-of-source-p
#'helm-beginning-of-source-p)))
- (catch 'break
- (while (not (funcall stop-fn))
- (funcall move-fn)
- (unless (string= curtype (funcall fn))
- (throw 'break nil)))))))
+ (helm-without-follow
+ (while (and (not (funcall stop-fn))
+ (string= curtype (funcall fn)))
+ (funcall move-fn)))
+ (helm-follow-execute-persistent-action-maybe 0.1))))
(defun helm-imenu-next-section ()
(interactive)
@@ -301,7 +301,7 @@ Each car is a regexp match pattern of the imenu type string."
when (string-match p x) return f
finally return 'default)))
types helm-imenu-delimiter)
- for disp = (propertize disp1 'help-echo bufname)
+ for disp = (propertize disp1 'help-echo bufname 'types types)
collect
(cons disp (cons k v))))