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 | 0d045754540ec413904c01892bbff423b80f4a1e (patch) | |
tree | 5c621ea2d746028f5a9adb54365cde8bcf773e9c /i_events.go | |
parent | comparing pointers on a daily basis (diff) | |
download | hardflip-0d045754540ec413904c01892bbff423b80f4a1e.tar.gz hardflip-0d045754540ec413904c01892bbff423b80f4a1e.tar.bz2 hardflip-0d045754540ec413904c01892bbff423b80f4a1e.tar.xz hardflip-0d045754540ec413904c01892bbff423b80f4a1e.tar.zst hardflip-0d045754540ec413904c01892bbff423b80f4a1e.zip |
great
Diffstat (limited to 'i_events.go')
-rw-r--r-- | i_events.go | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/i_events.go b/i_events.go index 9d86366..b710317 100644 --- a/i_events.go +++ b/i_events.go @@ -43,7 +43,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * hardflip: src/i_events.go - * Wed Dec 27 17:56:44 2023 + * Mon Jan 08 11:35:21 2024 * Joe * * events in the code @@ -60,9 +60,8 @@ import ( func i_reload_data(data *HardData) { data.ldirs = c_load_data_dir(data.data_dir, data.opts) data.litems = c_load_litems(data.ldirs) - data.ui.sel_max, - data.ui.count_dirs, - data.ui.count_hosts = i_get_sel_max(data.ldirs) + data.ui.sel_max, data.ui.count_dirs, data.ui.count_hosts = + i_get_sel_max(data.ldirs) } func i_delete_host(data *HardData) { @@ -98,14 +97,10 @@ func i_events(data *HardData) { os.Exit(0) } else if event.Rune() == 'j' || event.Key() == tcell.KeyDown { - if ui.sel_id < ui.sel_max - 1 { - ui.inc_sel(1, data) - } + ui.inc_sel(1, data) } else if event.Rune() == 'k' || event.Key() == tcell.KeyUp { - if ui.sel_id > 0 { - ui.inc_sel(-1, data) - } + ui.inc_sel(-1, data) } else if event.Rune() == 'g' { // TODO: litems.curr ui.sel_id = 0 |