aboutsummaryrefslogtreecommitdiffstats
path: root/i_events.go
diff options
context:
space:
mode:
authorJoe <rbo@gmx.us>2024-01-10 20:20:20 +0100
committerJoe <rbo@gmx.us>2024-01-10 20:20:20 +0100
commit8efd53677a2dcb802a24ba9deb52801981f33b4f (patch)
tree8a60befb6ca8cb49e51e09a80369bc264d0ed720 /i_events.go
parentkinda works i guess (diff)
downloadhardflip-8efd53677a2dcb802a24ba9deb52801981f33b4f.tar.gz
hardflip-8efd53677a2dcb802a24ba9deb52801981f33b4f.tar.bz2
hardflip-8efd53677a2dcb802a24ba9deb52801981f33b4f.tar.xz
hardflip-8efd53677a2dcb802a24ba9deb52801981f33b4f.tar.zst
hardflip-8efd53677a2dcb802a24ba9deb52801981f33b4f.zip
good
Diffstat (limited to '')
-rw-r--r--i_events.go11
1 files changed, 9 insertions, 2 deletions
diff --git a/i_events.go b/i_events.go
index e9f50bb..587aefa 100644
--- a/i_events.go
+++ b/i_events.go
@@ -96,7 +96,7 @@ func i_fold_dir(data *HardData, item *ItemsNode) {
if item == nil {
return
}
- // litems := data.litems
+ litems := data.litems
folds := data.folds
folded_start := item.next
folded_start.prev = nil
@@ -113,9 +113,16 @@ func i_fold_dir(data *HardData, item *ItemsNode) {
nil,
}
item.next = after
- after.prev = item
+ if after == nil {
+ litems.last = item
+ } else {
+ after.prev = item
+ }
folds[item] = &tmp
+ for ptr := litems.head; ptr.next != nil; ptr = ptr.next {
+ ptr.next.ID = ptr.ID + 1
+ }
}
func i_reload_data(data *HardData) {