From 1844f8bae695fc677062fb06db012a4102cd3f0a Mon Sep 17 00:00:00 2001 From: Joe Date: Fri, 5 Jan 2024 20:20:20 +0100 Subject: now really draw --- c_init.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'c_init.go') 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 } -- cgit v1.2.3