diff options
author | Joe <rbo@gmx.us> | 2024-01-08 20:20:20 +0100 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2024-01-08 20:20:20 +0100 |
commit | 18261f3f21383d74e332d445ebb0de7b30de64d8 (patch) | |
tree | 03052dc53de5e62a5797cc407a2050004e4978cd /i_ui.go | |
parent | great (diff) | |
download | hardflip-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.go | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -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, |