aboutsummaryrefslogtreecommitdiffstats
path: root/c_init.go
diff options
context:
space:
mode:
authorJoe <rbo@gmx.us>2024-01-05 20:20:20 +0100
committerJoe <rbo@gmx.us>2024-01-05 20:20:20 +0100
commit1844f8bae695fc677062fb06db012a4102cd3f0a (patch)
tree342992624a99bbc05b942d35e955c3be4cfd4b91 /c_init.go
parentnow draw litems list (diff)
downloadhardflip-1844f8bae695fc677062fb06db012a4102cd3f0a.tar.gz
hardflip-1844f8bae695fc677062fb06db012a4102cd3f0a.tar.bz2
hardflip-1844f8bae695fc677062fb06db012a4102cd3f0a.tar.xz
hardflip-1844f8bae695fc677062fb06db012a4102cd3f0a.tar.zst
hardflip-1844f8bae695fc677062fb06db012a4102cd3f0a.zip
now really draw
Diffstat (limited to 'c_init.go')
-rw-r--r--c_init.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/c_init.go b/c_init.go
index 222c796..413d91a 100644
--- a/c_init.go
+++ b/c_init.go
@@ -115,9 +115,14 @@ func c_load_data_dir(dir string, opts HardOpts) *DirsList {
// fills litems sorting with dirs last
// other sorting algos are concievable
+// this func also sets the root folder to unfolded as it may never be folded
+// this func also sets the default litems.curr
func c_load_litems(ldirs *DirsList) *ItemsList {
litems := ItemsList{}
+ if ldirs.head != nil {
+ ldirs.head.Folded = false
+ }
for ptr := ldirs.head; ptr != nil; ptr = ptr.next {
item := ItemsNode{ Dirs: ptr, Host: nil }
litems.add_back(&item)
@@ -126,5 +131,6 @@ func c_load_litems(ldirs *DirsList) *ItemsList {
litems.add_back(&item)
}
}
+ litems.curr = litems.head.next
return &litems
}