Sync UI path fallbacks during main landing
This commit is contained in:
+5
-2
@@ -234,12 +234,15 @@ func (u *ui) handleShortcutKey(name key.Name, modifiers key.Modifiers) bool {
|
||||
}
|
||||
|
||||
func (u *ui) activateBreadcrumb(index int) {
|
||||
var path []string
|
||||
if index <= 0 {
|
||||
u.state.NavigateToPath(nil)
|
||||
path = nil
|
||||
} else {
|
||||
crumbs := u.breadcrumbLabels()
|
||||
u.state.NavigateToPath(append([]string{}, crumbs[1:index+1]...))
|
||||
path = append([]string{}, crumbs[1:index+1]...)
|
||||
}
|
||||
u.currentPath = append([]string(nil), path...)
|
||||
u.state.NavigateToPath(path)
|
||||
u.filter()
|
||||
if index >= len(u.breadcrumbLabels()) {
|
||||
index = len(u.breadcrumbLabels()) - 1
|
||||
|
||||
Reference in New Issue
Block a user