From 464f20c44697ff50199a43e633e01145142aeb90 Mon Sep 17 00:00:00 2001 From: Joe Date: Fri, 12 Jan 2024 20:20:20 +0100 Subject: fuck i dont get it --- i_events.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'i_events.go') 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 } -- cgit v1.2.3