Keep parent breadcrumb on phone

This commit is contained in:
Joe Julian
2026-04-03 08:35:09 -07:00
parent 48dfe604cf
commit da53696435
2 changed files with 18 additions and 8 deletions
+1 -4
View File
@@ -5364,7 +5364,7 @@ func (u *ui) visibleBreadcrumbs(displayPath []string) ([]string, []int) {
return indices
}()
}
if u.mode != "phone" || len(displayPath) <= 1 {
if u.mode != "phone" || len(displayPath) <= 2 {
crumbs := append([]string{"/"}, append([]string{}, displayPath...)...)
indices := make([]int, 0, len(crumbs))
indices = append(indices, 0)
@@ -5373,9 +5373,6 @@ func (u *ui) visibleBreadcrumbs(displayPath []string) ([]string, []int) {
}
return crumbs, indices
}
if len(displayPath) == 2 {
return []string{"/", displayPath[len(displayPath)-1]}, []int{0, len(displayPath)}
}
crumbs := []string{"/", "…", displayPath[len(displayPath)-1]}
indices := []int{0, len(displayPath) - 1, len(displayPath)}
return crumbs, indices