Change help menus: Only display shortcuts used on the page

Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
Hadi
2026-05-18 20:23:56 +02:00
parent 6aa377acd8
commit 969febb14c
13 changed files with 115 additions and 49 deletions
+4 -1
View File
@@ -152,7 +152,10 @@ func (historyKeyMap) ShortHelp() []key.Binding {
func (m historyKeyMap) FullHelp() [][]key.Binding {
h := keys.Keys.History
g := keys.Keys.Global
pageGlobals := []key.Binding{g.Up, g.Down, g.CycleFocus, g.ScrollUp, g.ScrollDown, g.Left, g.Right, g.Escape, g.SendToReplay, g.SendToDiff, g.Copy, g.CopyAs}
all := []key.Binding{h.DeleteEntry, h.DeleteAll, h.Filter, h.SqlQuery}
all = append(all, keys.Keys.Global.Bindings()...)
all = append(all, pageGlobals...)
all = append(all, g.CommonBindings()...)
return keys.ChunkByWidth(all, m.width)
}