diff options
| author | João Távora <joaotavora@gmail.com> | 2023-08-29 16:52:32 +0100 |
|---|---|---|
| committer | João Távora <joaotavora@gmail.com> | 2023-09-04 12:20:54 +0100 |
| commit | df9e2c3678a12405736972bcdf4dae17ed9c43f8 (patch) | |
| tree | 922754b344bd0640e624c14517ec8b87e290b42e | |
| parent | 07b8e96ed48de8977b8f687f3b121fd0f2896c22 (diff) | |
Fix case when bc--ipath-alist results in something useless
* breadcrumb.el (breadcrumb-imenu-crumbs): Fix
| -rw-r--r-- | breadcrumb.el | 11 |
1 files 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 |
