aboutsummaryrefslogtreecommitdiffstats
path: root/i_events.go
diff options
context:
space:
mode:
authorJoe <rbo@gmx.us>2024-01-09 20:20:20 +0100
committerJoe <rbo@gmx.us>2024-01-09 20:20:20 +0100
commitd614eb676448a8b03de7a54b738446caf64343ee (patch)
treef918a9817a243f9c5d52979b3c90b3d18b0f7067 /i_events.go
parentthis fucking bug (diff)
downloadhardflip-d614eb676448a8b03de7a54b738446caf64343ee.tar.gz
hardflip-d614eb676448a8b03de7a54b738446caf64343ee.tar.bz2
hardflip-d614eb676448a8b03de7a54b738446caf64343ee.tar.xz
hardflip-d614eb676448a8b03de7a54b738446caf64343ee.tar.zst
hardflip-d614eb676448a8b03de7a54b738446caf64343ee.zip
i can't fix that shit
Diffstat (limited to '')
-rw-r--r--i_events.go17
1 files changed, 11 insertions, 6 deletions
diff --git a/i_events.go b/i_events.go
index 900bc19..62c93d7 100644
--- a/i_events.go
+++ b/i_events.go
@@ -52,7 +52,7 @@
package main
import (
- "fmt"
+ // "fmt"
"os"
"github.com/gdamore/tcell/v2"
@@ -61,15 +61,11 @@ import (
func i_update_folded_count(dir *DirsNode, ui *HardUI) {
delta := 0
- delta += dir.count_hosts()
- for ptr := dir.next; ptr.Depth > dir.Depth && ptr != nil; ptr = ptr.next {
- delta += ptr.count_hosts() + 1
- }
+ delta += dir.count_elements()
if dir.Folded == false {
delta *= -1
}
ui.folded_count += delta
- fmt.Println(">>>>> COUNT:", ui.folded_count)
}
func i_list_follow_cursor(litems *ItemsList, ui *HardUI) {
@@ -86,6 +82,15 @@ func i_list_follow_cursor(litems *ItemsList, ui *HardUI) {
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
+ }
+ }
}
func i_reload_data(data *HardData) {