From df9e2c3678a12405736972bcdf4dae17ed9c43f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20T=C3=A1vora?= Date: Tue, 29 Aug 2023 16:52:32 +0100 Subject: Fix case when bc--ipath-alist results in something useless * breadcrumb.el (breadcrumb-imenu-crumbs): Fix --- breadcrumb.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/breadcrumb.el b/breadcrumb.el index 2e9bddf..473edb8 100644 --- a/breadcrumb.el +++ b/breadcrumb.el @@ -227,11 +227,12 @@ These structures don't have a `breadcrumb-region' property on." (defun breadcrumb-imenu-crumbs () "Describe point inside the Imenu tree of current file." (when-let ((alist (bc--ipath-alist))) - (bc--summarize - (cl-loop for p in (bc-ipath alist (point)) - collect (bc--format-node p)) - bc-imenu-max-length - bc-imenu-crumb-separator))) + (when (cl-some #'identity alist) + (bc--summarize + (cl-loop for p in (bc-ipath alist (point)) + collect (bc--format-node p)) + bc-imenu-max-length + bc-imenu-crumb-separator)))) (defun bc--summarize (crumbs cutoff separator) (let ((rcrumbs -- cgit v1.0