diff options
author | Joe <rbo@gmx.us> | 2024-01-11 20:20:20 +0100 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2024-01-11 20:20:20 +0100 |
commit | 845f2d95dda04fbf0c2dbc67a1c74b35f54ff0e3 (patch) | |
tree | 6149e067c9c0f78dc40c8605846659aa45c6c942 /i_events.go | |
parent | gogo (diff) | |
download | hardflip-845f2d95dda04fbf0c2dbc67a1c74b35f54ff0e3.tar.gz hardflip-845f2d95dda04fbf0c2dbc67a1c74b35f54ff0e3.tar.bz2 hardflip-845f2d95dda04fbf0c2dbc67a1c74b35f54ff0e3.tar.xz hardflip-845f2d95dda04fbf0c2dbc67a1c74b35f54ff0e3.tar.zst hardflip-845f2d95dda04fbf0c2dbc67a1c74b35f54ff0e3.zip |
revert here if needed
Diffstat (limited to 'i_events.go')
-rw-r--r-- | i_events.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/i_events.go b/i_events.go index 99907cf..75beb40 100644 --- a/i_events.go +++ b/i_events.go @@ -74,10 +74,10 @@ func i_list_follow_cursor(litems *ItemsList, ui *HardUI) { } func i_unfold_dir(data *HardData, item *ItemsNode) { - if item == nil { + if item == nil || item.Dirs == nil { return } - fold := data.folds[item] + fold := data.folds[item.Dirs] if fold == nil { return } @@ -94,7 +94,7 @@ func i_unfold_dir(data *HardData, item *ItemsNode) { } else { data.litems.last = fold.last } - delete(data.folds, item) + delete(data.folds, item.Dirs) for ptr := data.litems.head; ptr.next != nil; ptr = ptr.next { ptr.next.ID = ptr.ID + 1 } @@ -136,7 +136,7 @@ func i_fold_dir(data *HardData, item *ItemsNode) { data.litems.last = item } - folds[item] = &tmp + folds[item.Dirs] = &tmp for ptr := data.litems.head; ptr.next != nil; ptr = ptr.next { ptr.next.ID = ptr.ID + 1 } |