aboutsummaryrefslogtreecommitdiffstats
path: root/i_events.go
diff options
context:
space:
mode:
Diffstat (limited to 'i_events.go')
-rw-r--r--i_events.go11
1 files changed, 7 insertions, 4 deletions
diff --git a/i_events.go b/i_events.go
index 34f6daf..c1f2d1e 100644
--- a/i_events.go
+++ b/i_events.go
@@ -128,14 +128,17 @@ func i_fold_dir(data *HardData, item *ItemsNode) {
ptr = ptr.next
// FIX: fix your crap
}
- if ptr == item {
+ if ptr == nil {
folded_end = nil
after = nil
- } else {
- folded_end = ptr.prev
data.ui.s.Fini()
- fmt.Println("qwe:", ptr.Dirs)
+ fmt.Println("ptr:", ptr)
os.Exit(0)
+ } else if ptr == item {
+ folded_end = nil
+ after = nil
+ } else {
+ folded_end = ptr.prev
after = folded_end.next
folded_end.next = nil
}