From 18261f3f21383d74e332d445ebb0de7b30de64d8 Mon Sep 17 00:00:00 2001 From: Joe Date: Mon, 8 Jan 2024 20:20:20 +0100 Subject: movement --- i_events.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'i_events.go') 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 { -- cgit v1.2.3