aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe <rbo@gmx.us>2024-01-10 20:20:20 +0100
committerJoe <rbo@gmx.us>2024-01-10 20:20:20 +0100
commit833930892f9b2ace553cea3d8b60ecd878dd019a (patch)
treea7587ecc4199c8ee6828b512155b04346bfc8a00
parenttime to cleanup a bit (diff)
downloadhardflip-833930892f9b2ace553cea3d8b60ecd878dd019a.tar.gz
hardflip-833930892f9b2ace553cea3d8b60ecd878dd019a.tar.bz2
hardflip-833930892f9b2ace553cea3d8b60ecd878dd019a.tar.xz
hardflip-833930892f9b2ace553cea3d8b60ecd878dd019a.tar.zst
hardflip-833930892f9b2ace553cea3d8b60ecd878dd019a.zip
clean after why slow
-rw-r--r--c_litems.go2
-rw-r--r--i_events.go4
-rw-r--r--i_ui.go20
3 files changed, 12 insertions, 14 deletions
diff --git a/c_litems.go b/c_litems.go
index 689a5e0..ce26648 100644
--- a/c_litems.go
+++ b/c_litems.go
@@ -148,7 +148,7 @@ func (litems *ItemsList) inc(jump int) {
if new_item == nil || jump == 0 {
return
- } else if jump == 1 {
+ } else if jump == +1 {
if new_item.next != nil {
new_item = new_item.next
}
diff --git a/i_events.go b/i_events.go
index 372623e..8f2c675 100644
--- a/i_events.go
+++ b/i_events.go
@@ -208,9 +208,9 @@ func i_events(data *HardData) {
event.Key() == tcell.KeyUp {
data.litems.inc(-1)
} else if event.Key() == tcell.KeyCtrlD {
- data.litems.inc(+(ui.dim[H] / 3))
+ data.litems.inc(+1000 + (ui.dim[H] / 3))
} else if event.Key() == tcell.KeyCtrlU {
- data.litems.inc(-(ui.dim[H] / 3))
+ data.litems.inc(-1000 - (ui.dim[H] / 3))
} else if event.Rune() == 'g' {
data.litems.curr = data.litems.head
data.litems.draw_start = data.litems.head
diff --git a/i_ui.go b/i_ui.go
index 1f49dd5..8a78569 100644
--- a/i_ui.go
+++ b/i_ui.go
@@ -231,9 +231,7 @@ func i_host_panel_dirs(ui HardUI, icons bool,
}
text := ""
for i := 0; i < int(dirs.Depth) - 2; i++ {
- for i := 0; i < int(dirs.Depth) - 2; i++ {
text += " "
- }
}
if icons == true {
var fold_var uint8
@@ -260,8 +258,8 @@ func i_host_panel_host(ui HardUI, icons bool,
style = style.Reverse(true)
}
text := ""
- for i := 0; i < int(depth) - 2; i++ {
- text += " "
+ for i := 0; i < int(depth + 1) - 2; i++ {
+ text += " "
}
if icons == true {
text += HOST_ICONS[int(host.Protocol)]
@@ -283,7 +281,7 @@ func i_host_panel(ui HardUI, icons bool, litems *ItemsList) {
" Hosts ", false)
line := 1
ptr := litems.draw_start
- for ptr = ptr; ptr != nil && line < ui.dim[H] - 2; ptr = ptr.next {
+ for ; ptr != nil && line < ui.dim[H] - 2; ptr = ptr.next {
// if ptr.folded_parents() == true {
// continue
// }
@@ -295,9 +293,9 @@ func i_host_panel(ui HardUI, icons bool, litems *ItemsList) {
litems.curr.Host,
line)
// FIX: === delete this after fix
- i_draw_text(ui.s,
- 1, line, ui.dim[W] / 3, line,
- ui.def_style, strconv.Itoa(ptr.ID))
+ // i_draw_text(ui.s,
+ // 1, line, ui.dim[W] / 3, line,
+ // ui.def_style, strconv.Itoa(ptr.ID))
// FIX: ===
line++
} else if ptr.Dirs != nil {
@@ -306,9 +304,9 @@ func i_host_panel(ui HardUI, icons bool, litems *ItemsList) {
litems.curr.Dirs,
line)
// FIX: === delete this after fix
- i_draw_text(ui.s,
- 1, line, ui.dim[W] / 3, line,
- ui.def_style, strconv.Itoa(ptr.ID))
+ // i_draw_text(ui.s,
+ // 1, line, ui.dim[W] / 3, line,
+ // ui.def_style, strconv.Itoa(ptr.ID))
// FIX: ===
line++
}