diff options
author | Joe <rbo@gmx.us> | 2024-01-10 20:20:20 +0100 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2024-01-10 20:20:20 +0100 |
commit | 43e669eb01791b87ed570ab424a66984f26da399 (patch) | |
tree | 5806bdbc0061f4950d8f20d0110a41f7529320e9 /i_events.go | |
parent | trying that map (diff) | |
download | hardflip-43e669eb01791b87ed570ab424a66984f26da399.tar.gz hardflip-43e669eb01791b87ed570ab424a66984f26da399.tar.bz2 hardflip-43e669eb01791b87ed570ab424a66984f26da399.tar.xz hardflip-43e669eb01791b87ed570ab424a66984f26da399.tar.zst hardflip-43e669eb01791b87ed570ab424a66984f26da399.zip |
tmp
Diffstat (limited to '')
-rw-r--r-- | i_events.go | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/i_events.go b/i_events.go index 8caf2d5..8cf9a82 100644 --- a/i_events.go +++ b/i_events.go @@ -92,6 +92,17 @@ func i_list_follow_cursor(litems *ItemsList, ui *HardUI) { // } } +func i_fold_dir(data *HardData, item *ItemsNode) { + litems := data.litems + folds := data.folds + + folds[item] = &ItemsList{ + nil, + nil, + nil, + } +} + func i_reload_data(data *HardData) { // TODO: remove this after debug fmt.Println("remove me sometime") @@ -164,10 +175,10 @@ func i_events(data *HardData) { data.litems.draw_start = data.litems.head } else if event.Rune() == 'G' { data.litems.curr = data.litems.last - for data.litems.curr.prev != nil && - data.litems.curr.folded_parents() == true { - data.litems.curr = data.litems.curr.prev - } + // for data.litems.curr.prev != nil && + // data.litems.curr.folded_parents() == true { + // data.litems.curr = data.litems.curr.prev + // } } else if event.Rune() == 'D' && data.ldirs.head != nil && ui.sel_max != 0 { @@ -195,6 +206,7 @@ func i_events(data *HardData) { } else { data.litems.curr.Dirs.Folded = false } + i_fold_dir(data, data.litems.curr) } } else if event.Rune() == ' ' { if data.litems.curr == nil || |