aboutsummaryrefslogtreecommitdiffstats
path: root/i_events.go
diff options
context:
space:
mode:
authorJoe <rbo@gmx.us>2024-01-11 20:20:20 +0100
committerJoe <rbo@gmx.us>2024-01-11 20:20:20 +0100
commit845f2d95dda04fbf0c2dbc67a1c74b35f54ff0e3 (patch)
tree6149e067c9c0f78dc40c8605846659aa45c6c942 /i_events.go
parentgogo (diff)
downloadhardflip-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.go8
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
}