diff options
author | Joe <rbo@gmx.us> | 2024-01-09 20:20:20 +0100 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2024-01-09 20:20:20 +0100 |
commit | 3b8e8cc804e52b780460d95d3c7ea0dd90f582ba (patch) | |
tree | 54f2560074f105a390f84abcc20bb9f32319f369 | |
parent | small fix (diff) | |
download | hardflip-3b8e8cc804e52b780460d95d3c7ea0dd90f582ba.tar.gz hardflip-3b8e8cc804e52b780460d95d3c7ea0dd90f582ba.tar.bz2 hardflip-3b8e8cc804e52b780460d95d3c7ea0dd90f582ba.tar.xz hardflip-3b8e8cc804e52b780460d95d3c7ea0dd90f582ba.tar.zst hardflip-3b8e8cc804e52b780460d95d3c7ea0dd90f582ba.zip |
its hard tho
Diffstat (limited to '')
-rw-r--r-- | i_events.go | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/i_events.go b/i_events.go index b0e904e..cda0427 100644 --- a/i_events.go +++ b/i_events.go @@ -52,7 +52,7 @@ package main import ( - // "fmt" + "fmt" "os" "github.com/gdamore/tcell/v2" @@ -72,29 +72,29 @@ 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 - } for litems.draw_start.ID > litems.curr.ID && litems.draw_start.prev != nil { 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 { - // 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 - // } - // } + 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) { // FIX: segv if data dir is removed + fmt.Println("remove me sometime") data.ldirs = c_load_data_dir(data.data_dir, data.opts) data.litems = c_load_litems(data.ldirs) data.ui.sel_max = data.litems.last.ID |