diff options
-rw-r--r-- | i_events.go | 25 | ||||
-rw-r--r-- | i_ui.go | 6 |
2 files changed, 23 insertions, 8 deletions
diff --git a/i_events.go b/i_events.go index 8cf9a82..e9f50bb 100644 --- a/i_events.go +++ b/i_events.go @@ -43,7 +43,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * hardflip: src/i_events.go - * Wed Jan 10 11:30:31 2024 + * Wed Jan 10 12:04:16 2024 * Joe * * events in the code @@ -93,14 +93,29 @@ func i_list_follow_cursor(litems *ItemsList, ui *HardUI) { } func i_fold_dir(data *HardData, item *ItemsNode) { - litems := data.litems + if item == nil { + return + } + // litems := data.litems folds := data.folds - - folds[item] = &ItemsList{ - nil, + folded_start := item.next + folded_start.prev = nil + folded_end := item + for i := 0; i < item.Dirs.count_elements() && folded_end != nil; i++ { + folded_end = folded_end.next + } + after := folded_end.next + folded_end.next = nil + tmp := ItemsList{ + folded_start, + folded_end, nil, nil, } + item.next = after + after.prev = item + + folds[item] = &tmp } func i_reload_data(data *HardData) { @@ -43,7 +43,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * hardflip: src/i_ui.go - * Wed Jan 10 11:30:15 2024 + * Wed Jan 10 12:04:11 2024 * Joe * * interfacing with the user @@ -52,8 +52,8 @@ package main import ( - "fmt" - "os" + // "fmt" + // "os" "strconv" "github.com/gdamore/tcell/v2" |