From 9b907c908f1afe07e4a5beb702e2ae2177d7f78a Mon Sep 17 00:00:00 2001 From: Joe Date: Thu, 11 Jan 2024 20:20:20 +0100 Subject: fix that --- i_events.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/i_events.go b/i_events.go index 1369ffa..34f6daf 100644 --- a/i_events.go +++ b/i_events.go @@ -52,6 +52,7 @@ package main import ( + "fmt" "os" "github.com/gdamore/tcell/v2" @@ -123,11 +124,18 @@ func i_fold_dir(data *HardData, item *ItemsNode) { for next_dir != nil && ptr != nil && ptr.Dirs != next_dir { ptr = ptr.next } + if ptr == item { + ptr = ptr.next + // FIX: fix your crap + } if ptr == item { folded_end = nil after = nil } else { folded_end = ptr.prev + data.ui.s.Fini() + fmt.Println("qwe:", ptr.Dirs) + os.Exit(0) after = folded_end.next folded_end.next = nil } -- cgit v1.2.3