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_events.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 'i_events.go')
-rw-r--r-- | i_events.go | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/i_events.go b/i_events.go index b710317..1a8b4ca 100644 --- a/i_events.go +++ b/i_events.go @@ -97,16 +97,18 @@ func i_events(data *HardData) { os.Exit(0) } else if event.Rune() == 'j' || event.Key() == tcell.KeyDown { - ui.inc_sel(1, data) + ui.inc_sel(+1, data) } else if event.Rune() == 'k' || event.Key() == tcell.KeyUp { ui.inc_sel(-1, data) + } else if event.Key() == tcell.KeyCtrlD { + ui.inc_sel(ui.dim[H] / 4, data) + } else if event.Key() == tcell.KeyCtrlU { + ui.inc_sel(-(ui.dim[H] / 4), data) } else if event.Rune() == 'g' { - // TODO: litems.curr - ui.sel_id = 0 + data.litems.curr = data.litems.head } else if event.Rune() == 'G' { - // TODO: litems.curr - ui.sel_id = ui.sel_max - 1 + data.litems.curr = data.litems.last } else if event.Rune() == 'D' && data.ldirs.head != nil && ui.sel_max != 0 { |