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 | 29d3811e9b44bdf532a8b87ee5fe61fd3a0e71a6 (patch) | |
tree | b983c6ad396de43f25980bdfe14d0517b8e150f8 /i_events.go | |
parent | revert if needed (diff) | |
download | hardflip-29d3811e9b44bdf532a8b87ee5fe61fd3a0e71a6.tar.gz hardflip-29d3811e9b44bdf532a8b87ee5fe61fd3a0e71a6.tar.bz2 hardflip-29d3811e9b44bdf532a8b87ee5fe61fd3a0e71a6.tar.xz hardflip-29d3811e9b44bdf532a8b87ee5fe61fd3a0e71a6.tar.zst hardflip-29d3811e9b44bdf532a8b87ee5fe61fd3a0e71a6.zip |
trying that map
Diffstat (limited to '')
-rw-r--r-- | i_events.go | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/i_events.go b/i_events.go index 7f05f21..8caf2d5 100644 --- a/i_events.go +++ b/i_events.go @@ -43,7 +43,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * hardflip: src/i_events.go - * Tue Jan 09 15:14:14 2024 + * Wed Jan 10 11:30:31 2024 * Joe * * events in the code @@ -59,20 +59,20 @@ import ( "golang.org/x/term" ) -func i_update_folded_count(dir *DirsNode, ui *HardUI) { - delta := 0 - delta += dir.count_elements() - if dir.Folded == false { - delta *= -1 - } - ui.folded_count += delta -} +// func i_update_folded_count(dir *DirsNode, ui *HardUI) { +// delta := 0 +// delta += dir.count_elements() +// if dir.Folded == false { +// delta *= -1 +// } +// ui.folded_count += delta +// } func i_list_follow_cursor(litems *ItemsList, ui *HardUI) { if litems.draw_start == nil || litems.curr == nil { return } - virt_id := litems.curr.ID - (ui.dim[H] - 4) - ui.folded_count + virt_id := litems.curr.ID - (ui.dim[H] - 4) // - ui.folded_count for litems.draw_start.ID < virt_id && litems.draw_start.next != nil { litems.draw_start = litems.draw_start.next @@ -82,14 +82,14 @@ func i_list_follow_cursor(litems *ItemsList, ui *HardUI) { litems.draw_start = litems.draw_start.prev } // fmt.Println(">>>>> DRAW_START:", litems.draw_start.ID, "<<<<<<< >>>>>>>> VIRT_ID:", virt_id) - if litems.draw_start.prev != nil && - litems.draw_start.prev.is_dir() == true && - litems.draw_start.prev.Dirs.Folded == true { + // if litems.draw_start.prev != nil && + // litems.draw_start.prev.is_dir() == true && + // litems.draw_start.prev.Dirs.Folded == true { // tmp := litems.draw_start.prev.Dirs.count_elements() // for i := 0; i < tmp && litems.draw_start != nil; i++ { // litems.draw_start = litems.draw_start.next // } - } + // } } func i_reload_data(data *HardData) { @@ -206,7 +206,7 @@ func i_events(data *HardData) { } else { data.litems.curr.Dirs.Folded = false } - i_update_folded_count(data.litems.curr.Dirs, ui) + // i_update_folded_count(data.litems.curr.Dirs, ui) } else if event.Key() == tcell.KeyCtrlR { i_reload_data(data) } |