aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--c_ldirs.go1
-rw-r--r--i_events.go11
2 files changed, 8 insertions, 4 deletions
diff --git a/c_ldirs.go b/c_ldirs.go
index 3de40e5..2fca939 100644
--- a/c_ldirs.go
+++ b/c_ldirs.go
@@ -165,6 +165,7 @@ func (dir *DirsNode) count_hosts() int {
}
return dir.lhost.last.ID + 1
}
+
// return the number of hosts and subfolders of the dir
// func (item *ItemsNode) count_elements(skip_folds bool,
// folds map[*DirsNode]*ItemsList) (*ItemsNode, int) {
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
}