diff options
| -rw-r--r-- | breadcrumb.el | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/breadcrumb.el b/breadcrumb.el index 12195c6..7e3546b 100644 --- a/breadcrumb.el +++ b/breadcrumb.el @@ -196,7 +196,15 @@ These structures don't have a `breadcrumb-region' property on." (put-text-property 0 1 'breadcrumb-siblings (cdr siblings) (car ipath)) (setq bc--ipath-plain-cache (vconcat bc--ipath-plain-cache - `[,(cons (cdr n) ipath)]))))) + `[,(cons + ;; See github#17 and docstring of + ;; `imenu--index-alist' for the + ;; "overlay" edge case. + (cl-etypecase (cdr n) + (number (cdr n)) + (marker (cdr n)) + (overlay (overlay-start (cdr n)))) + ipath)]))))) (unless bc--ipath-plain-cache (mapc (lambda (i) (dfs i nil index-alist)) index-alist) (setq bc--ipath-plain-cache (cl-sort bc--ipath-plain-cache #'< :key #'car))) |
