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 | |
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-- | c_hardflip.go | 2 | ||||
-rw-r--r-- | c_litems.go | 28 | ||||
-rw-r--r-- | i_events.go | 30 | ||||
-rw-r--r-- | i_ui.go | 10 |
4 files changed, 35 insertions, 35 deletions
diff --git a/c_hardflip.go b/c_hardflip.go index 02952bd..ed7c848 100644 --- a/c_hardflip.go +++ b/c_hardflip.go @@ -43,7 +43,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * hardflip: src/c_hardflip.go - * Fri Jan 05 16:10:29 2024 + * Wed Jan 10 11:03:24 2024 * Joe * * the main diff --git a/c_litems.go b/c_litems.go index 5e8a1a9..03c2ae1 100644 --- a/c_litems.go +++ b/c_litems.go @@ -43,7 +43,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * hardflip: src/c_litems.go - * Tue Jan 09 10:51:22 2024 + * Wed Jan 10 11:30:12 2024 * Joe * * the dir and hosts linked list @@ -164,19 +164,19 @@ func (litems *ItemsList) inc(jump int) { new_item = new_item.prev } } - for jump > 0 && - new_item.folded_parents() == true && - new_item.next != nil { - new_item = new_item.next - } - for jump < 0 && - new_item.folded_parents() == true && - new_item.prev != nil { - new_item = new_item.prev - } - if new_item == litems.last && new_item.folded_parents() == true { - return - } + // for jump > 0 && + // new_item.folded_parents() == true && + // new_item.next != nil { + // new_item = new_item.next + // } + // for jump < 0 && + // new_item.folded_parents() == true && + // new_item.prev != nil { + // new_item = new_item.prev + // } + // if new_item == litems.last && new_item.folded_parents() == true { + // return + // } litems.curr = new_item } 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) } @@ -43,7 +43,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * hardflip: src/i_ui.go - * Tue Jan 09 12:00:46 2024 + * Wed Jan 10 11:30:15 2024 * Joe * * interfacing with the user @@ -64,7 +64,7 @@ type HardUI struct { def_style tcell.Style dir_style tcell.Style title_style tcell.Style - folded_count int + // folded_count int dim [2]int } @@ -284,9 +284,9 @@ func i_host_panel(ui HardUI, icons bool, litems *ItemsList) { line := 1 ptr := litems.draw_start for ptr = ptr; ptr != nil && line < ui.dim[H] - 2; ptr = ptr.next { - if ptr.folded_parents() == true { - continue - } + // if ptr.folded_parents() == true { + // continue + // } if ptr.is_dir() == false && ptr.Host != nil { i_host_panel_host(ui, icons, |