summaryrefslogtreecommitdiff
path: root/breadcrumb.el
diff options
context:
space:
mode:
authorJoão Távora <joaotavora@gmail.com>2026-05-02 23:56:28 +0100
committerJoão Távora <joaotavora@gmail.com>2026-05-02 23:56:28 +0100
commit495b5117521beb6192b95da959c36007bca5b6cb (patch)
treeb329c116cc4b05689382559820a1add747d45f53 /breadcrumb.el
parent1d9dd90f77a594cd50b368e6efc85d44539ec209 (diff)
Trim whitespace off imenu path nodes
Modes such as the new markdown-ts-mode have dirty imenu entries. It's a bug there, but it doesn't hurt much to trim them here anyways. * breadcrumb.el (breadcrumb-imenu-crumbs): Tweak.
Diffstat (limited to 'breadcrumb.el')
-rw-r--r--breadcrumb.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/breadcrumb.el b/breadcrumb.el
index 1dc3ed5..efde47f 100644
--- a/breadcrumb.el
+++ b/breadcrumb.el
@@ -296,12 +296,12 @@ These structures don't have a `breadcrumb-region' property on."
;;;###autoload
(defun breadcrumb-imenu-crumbs ()
"Describe point inside the Imenu tree of current file."
- (when-let ((alist (bc--ipath-alist)))
+ (when-let* ((alist (bc--ipath-alist)))
(when (cl-some #'identity alist)
(bc--summarize
(cl-loop
for (p . more) on (bc-ipath alist (point))
- collect (bc--format-ipath-node p more))
+ collect (bc--format-ipath-node (string-trim p) more))
(bc--length bc-imenu-max-length)
(propertize bc-imenu-crumb-separator
'face 'bc-face)))))