aboutsummaryrefslogtreecommitdiffstats
path: root/i_events.go
diff options
context:
space:
mode:
authorJoe <rbo@gmx.us>2024-01-12 20:20:20 +0100
committerJoe <rbo@gmx.us>2024-01-12 20:20:20 +0100
commit464f20c44697ff50199a43e633e01145142aeb90 (patch)
tree7da582bf8038d3680ff6f3e23491ae18fe60e39a /i_events.go
parentdebug (diff)
downloadhardflip-464f20c44697ff50199a43e633e01145142aeb90.tar.gz
hardflip-464f20c44697ff50199a43e633e01145142aeb90.tar.bz2
hardflip-464f20c44697ff50199a43e633e01145142aeb90.tar.xz
hardflip-464f20c44697ff50199a43e633e01145142aeb90.tar.zst
hardflip-464f20c44697ff50199a43e633e01145142aeb90.zip
fuck i dont get it
Diffstat (limited to 'i_events.go')
-rw-r--r--i_events.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/i_events.go b/i_events.go
index c1f2d1e..9666adc 100644
--- a/i_events.go
+++ b/i_events.go
@@ -124,7 +124,7 @@ func i_fold_dir(data *HardData, item *ItemsNode) {
for next_dir != nil && ptr != nil && ptr.Dirs != next_dir {
ptr = ptr.next
}
- if ptr == item {
+ if ptr == item && ptr.next != nil {
ptr = ptr.next
// FIX: fix your crap
}
@@ -137,8 +137,14 @@ func i_fold_dir(data *HardData, item *ItemsNode) {
} else if ptr == item {
folded_end = nil
after = nil
+ data.ui.s.Fini()
+ fmt.Println("this is the end")
+ os.Exit(0)
} else {
folded_end = ptr.prev
+ // data.ui.s.Fini()
+ // fmt.Println("ptr.Dirs.Name:", ptr.Host.Name, "\nfolded_end:", folded_end)
+ // os.Exit(0)
after = folded_end.next
folded_end.next = nil
}