From 0e04dee680b90e4c55f8591d0959934b59993a63 Mon Sep 17 00:00:00 2001 From: Joe Date: Mon, 13 May 2024 20:20:20 +0200 Subject: gg --- src/e_keys.go | 5 ++++- src/i_help.go | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/e_keys.go b/src/e_keys.go index db38df8..3fe9d6c 100644 --- a/src/e_keys.go +++ b/src/e_keys.go @@ -856,7 +856,10 @@ func e_help_events(data *HardData, ui *HardUI, event tcell.EventKey) bool { } else if event.Rune() == 'g' { ui.help_scroll = 0 } else if event.Rune() == 'G' { - // TODO: here + for ui.help_end != true { + ui.help_scroll += 1 + i_draw_help(ui) + } } return false } diff --git a/src/i_help.go b/src/i_help.go index c022012..c13b0b7 100644 --- a/src/i_help.go +++ b/src/i_help.go @@ -61,6 +61,9 @@ func i_draw_help(ui *HardUI) { ui.dim[W] - 6, ui.dim[H] - 3, } + if win.B > win.T + len(HELP_NORMAL_KEYS) + 1 { + win.B = win.T + len(HELP_NORMAL_KEYS) + 1 + } i_draw_box(ui.s, win.L, win.T, win.R, win.B, ui.style[BOX_STYLE], ui.style[HEAD_STYLE], -- cgit v1.2.3