aboutsummaryrefslogtreecommitdiffstats
path: root/i_ui.go
diff options
context:
space:
mode:
authorJoe <rbo@gmx.us>2024-01-08 20:20:20 +0100
committerJoe <rbo@gmx.us>2024-01-08 20:20:20 +0100
commit18261f3f21383d74e332d445ebb0de7b30de64d8 (patch)
tree03052dc53de5e62a5797cc407a2050004e4978cd /i_ui.go
parentgreat (diff)
downloadhardflip-18261f3f21383d74e332d445ebb0de7b30de64d8.tar.gz
hardflip-18261f3f21383d74e332d445ebb0de7b30de64d8.tar.bz2
hardflip-18261f3f21383d74e332d445ebb0de7b30de64d8.tar.xz
hardflip-18261f3f21383d74e332d445ebb0de7b30de64d8.tar.zst
hardflip-18261f3f21383d74e332d445ebb0de7b30de64d8.zip
movement
Diffstat (limited to '')
-rw-r--r--i_ui.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/i_ui.go b/i_ui.go
index 0e6fd9a..d05a095 100644
--- a/i_ui.go
+++ b/i_ui.go
@@ -78,10 +78,6 @@ func (ui *HardUI) inc_sel(n int, data *HardData) {
if data.litems.curr == nil {
return
}
- if ui.sel_id + n < 1 ||
- ui.sel_id + n > ui.sel_max {
- n = 0
- }
data.litems.curr = data.litems.curr.inc(n)
ui.sel_id = data.litems.curr.ID
if ui.sel_id > ui.list_start + ui.dim[H] - 4 {
@@ -298,8 +294,8 @@ func i_host_panel(ui HardUI, icons bool, litems *ItemsList) {
ui.dim[W] / 3, ui.dim[H] - 2,
" Hosts ", false)
line := 1
- ptr := litems.head.next
- for ptr = ptr; ptr != nil; ptr = ptr.next {
+ ptr := litems.head
+ for ptr = ptr; ptr != nil && line < ui.dim[H] - 2; ptr = ptr.next {
if ptr.is_dir() == false {
i_host_panel_host(ui,
icons,